Open mrAceT opened 1 year ago
Cc @nextcloud/server-frontend
Indeed, here is an example how the Photos app tackled this: https://github.com/nextcloud/photos/blob/master/src/components/File.vue#L213
The Viewer needs to trigger the right event and we need to update the etag accordingly then.
It already does with updated data: https://github.com/nextcloud/viewer/blob/4523801d037d736da3186cef161d4b93130422db/src/components/ImageEditor.vue#L184-L197
⚠️ This issue respects the following points: ⚠️
Bug description
Nextcloud nicely generates images to be shown in the web interface, also there is an image editor available. When one changes something in an image, the preview doesn't seem to update..
Steps to reproduce
Expected behavior
One would expect to see the changed image..
FIX SUGGESTION I have this problem in my coding sometimes too. The problem is the caching of the browser. There is a little trick to fix this: The image URL is something like:
[URL]/core/preview?fileId=964&x=1920&y=1080&a=true
When one would add something unique, like the file time ('storage_mtime' in 'oc_filecache' would seem to be perfectly suitable for this) then the URL becomes a new one and one can force an update. Something like:
[URL]/core/preview?fileId=964&x=1920&y=1080&a=true&mtime=1674741268
Then that URL gets cached (do not add a random number, that would strain the caching unnecessarily)