-
Notifications
You must be signed in to change notification settings - Fork 33
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
Update file paths in content when media file is replaced #1168
Comments
Referring here to issue #1742 - it would still be helpful to have an updated and an original date, so that I know that the file has been updated - it if is not too much hassle |
Could you notify the app team in this issue once this is done please? Thanks :) |
I'm wondering what makes most sense here. Currently files are stored like this:
Am I missing something? :) |
Hmm, I guess I would stick with the year/month naming scheme instead of integreat-cms/integreat_cms/cms/models/media/media_file.py Lines 46 to 55 in cd9508f
And I think Django does not automatically delete the old file, yes so we'd have to do that manually. |
Thank you for the hint. Was a little bit stuck here. |
Describe the Bug
At the moment, we keep the file path identical when we're replacing media files.
This has the disadvantage that the app needs to download the files again to check whether it has changed. It would be more efficient if we treat filenames more like unique ids of files and change them in the content when they are replaced.
Steps to Reproduce
Expected Behavior
When a media file is replaced in the media library, the new image should also be shown in the apps.
We can use the
Link
model of the linkcheck app to get the mapping between media files and page translations which contain the file. Then, we can update the url in the content.Actual Behavior
Since the file path doesn't change, it is cached at the moment
Additional Information
Related issues:
The text was updated successfully, but these errors were encountered: