After upgrading my self-hosted seafile installation from version 10 to 12, and converting from SQLite to MySQL (MariaDB) in the process, download links are incorrect. They look like this link:
https://seafile.example.com/seafhttp/repos/fe89830d-81e8-4297-ae99-fdf97fb0256e/files//beleggen.jpg/?op=download
The first part - seafile.example.com - is wrong; my server is located at seafile.sikanda.be.
I checked my seahub_settings.py: it includes these two settings:
SERVICE_URL = ‘https://seafile.sikanda.be’
FILE_SERVER_ROOT = ‘https://seafile.sikanda.be/seafhttp’
Are there any other settings I need to check?
SERVICE_URL and FILE_SERVER_ROOT are removed in version 12.0.
SERVICE_URL will be calculated from SEAFILE_SERVER_PROTOCOL and SEAFILE_SERVER_HOSTNAME in .env file.
So make sure SEAFILE_SERVER_PROTOCOL and SEAFILE_SERVER_HOSTNAME are set correctly.
Quick notes for anyone who runs into the same issue:
-
I am not using Docker
-
The .env file is in seafile/conf/.env (where seafile is the top level directory of my seafile installation)
-
Default content includes SEAFILE_SERVER_HOSTNAME=``seafile.example.com which explains my issue