It seems like the avatars from all users of my gitea instance are gone after updating from 1.20.3. I don’t remember what version I used before, it was either 1.19.x or 1.20.2.
Could you paste your other configurations? Especially [storage]. And you can also try change [picture] AVATAR_UPLOAD_PATH = data/avatars to an absolute path or change it to [picture] AVATAR_UPLOAD_PATH = avatars and take a look whether it fix your problem.
I have some other relative path variables with prefixed data/ in my conf file. For instance:
[lfs]
; Where your lfs files put on, default is data/lfs.
PATH = data/lfs
[attachment]
; Whether attachments are enabled. Defaults to `true`
ENABLE = true
; Path for attachments. Defaults to `data/attachments`
PATH = data/attachments
Are all of these wrong now and also need to be corrected? This used to be a default setting some time ago, so a breaking change like this wouldn’t be great to happen so silently.
I still don’t understand why I’d change PATH = data/attachments and AVATAR_UPLOAD_PATH = data/avatars to PATH = attachments and AVATAR_UPLOAD_PATH = avatars but leave PATH = data/lfs the way it is?
Just to be clear, only some path settings (like avatars and attachments) need to have the data directory removed and some still need to have it present (like LFS data)?
That’s because the relative path’s base path changed. Before it will be app path, now it becomes data path. Sorry for the break, I think we have notices on release notes.
My question was why to change only the path of attachments and leave other path variables like lfs the way they are. Turns out, you have to change all path variables, so also the LFS path variable needs to be changed from PATH = data/lfs to PATH = lfs. Otherwise there’ll be issues when cloning a repo with LFS data.
If the app.ini is read only (e.g. because it is mapped into a docker container as read only file) gitea can’t write the work path as WORK_PATH to the app.ini file on startup. Instead of changing all the default relative paths you could try to just set WORK_PATH to the correct location.