-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Avatars won't display if the app is migrated to a different sub-path #1776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello, |
Reopen? |
The bug is at CollectionFS, as can be seen at #386 . a) Workaround way: In b) As part of #142 supporting other ways to store attachments, make all attachments to use any of those ways to store attachments with correct URLs. |
We recently experienced the same issue by changing wekan from a subpath db.users.find({"profile.avatarUrl": /^\/wekan\//}).forEach(function(e,i) {
e.profile.avatarUrl=e.profile.avatarUrl.substring(6);
db.users.save(e);
}); |
Can you try to make pull request that would at |
When sub-path changes, would that require changes to other images and attachments? You could check at MongoDB database. |
Thanks! |
@xet7 I’ll look into it this weekend. |
Issue
Server Setup Information:
Problem description:
When migrating Wekan to a new host, the user avatar will become inaccessible, HTTP status 404. Using the ROOR_URL above, the
src
attribute of the<img>
tag is always pointed to/wekan/cfs/files/avatars/RandomString/filename.jpg
(removing the/wekan
part from Chrome Dev Tools after migration will load the image correctly).When viewing the data from mongo CLI, I discovered that the sub-path is stored into the DB:
Interestingly, also stored in
/cfs
, attachments work fine after migration. If the attachment is an image file, the preview loads correctly.Maybe related to #386, #973.
Steps to reproduce:
Workaround:
Not tested yet, but theoretically, one can use the mongo CLI to replace the old sub-path with RegExp. Ref
The text was updated successfully, but these errors were encountered: