-
Notifications
You must be signed in to change notification settings - Fork 54
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
Not change content of image when replace image in NextCloud #278
Comments
Hey! A few questions then:
I have a few possibilities here:
cc @rullzer |
Does the viewer force reload images? As we set the last modified header |
@rullzer we rely on a simple |
Let me try to reproduce then |
@rullzer you can also wait for @thanhcong7893's input ;) |
I can reproduce this. I guess it is because of thecache headers. Will test. |
So yes and no. Part is that. But once the image is downloaded by the browser it doesn't revalidate in the same request. We could add a cache buster. But that would mean we keep downloading. I guess for now you'll just have to reload |
@skjnldsv Step 3: I upload a new file to replace old file. Step 4: I view once again. See content of old image I reloaded page, but not working. However I download file which is still new file. |
Thanks :) |
I pressed Ctrl + Shift/(CMD if mac) + R to force refresh and I opened new tab to view . But It do not change. However I open my incognito and view again that worked. |
@rullzer so, browser cache :) |
How to fix it or auto force update cache browser |
Well we can limit the cached time of course. I'll see what I can do but this is rather low priority on my list. |
@rullzer I would add a parameter to the preview url with the mtime, so if it changes, then it will force the reload? |
@skjnldsv How long do you fix it? |
@thanhcong7893 well, we're all working in lots of locations for this, so I cannot give you ETA :) |
@skjnldsv sounds fair enough |
@skjnldsv better yet you also have the etag right? |
I have an svg image with a bit of text that if you change just two characters then render a png, the md5sum of the redendered png will be the same as the previous rendered one (with unchanged characters). The browsers keeps using the first one, if the name is changed, the same. What to do on a case like this? Update: Seems like going to the WebUI delete the file, go to the trashbin and delete it there, is the only way it will update to the latest and new rendered image. Regards |
Actually I have JPG files which are located on external storage (local). When they change (e.g. edited via GIMP), the previews are not updated. Thus all the views using e.g. the web UI show the old image. If I download it, it is actually the new/changed version. The only way to get Nextcloud to show the new version in the web UI is to delete the |
@freddyli when you change the file, do you edit it directly on your nxtcloud files, or are they synced with a client? (android, desktop...) If it only occurs on the photos app, then please tell me :) |
@skjnldsv Thanks for the quick reply! In this case I have "external storage" mounted in nextcloud, which is indeed a local folder on the machine. Nextcloud is supposed to check for file / directory changes on each access / listing of the directory - Setting:
So if I change the image "from outside", then look at the modified date, it stays the same.(**) If I then e.g. create a folder in the same folder, the modified date of my image gets also updated in the web UI. But: Looking at the image (the following link is used: So, the previews seem to not being updated or the image seems to not being recognized as changed. I hope this clears things up a bit; in spite of those many words =) (**) maybe this can also be optimized in the |
Yep, the issue seems more like an external storage problem :) |
Hi @skjnldsv - thanks for "confirming" - honestly I do not know how to search the nextcloud/server repo issues efficiently. If i search there for |
I'll be honest, I've been around for a while, and I still fail to find some issues with github search 😅 |
I tested it lately with the addition of the image editor and it works fine |
@skjnldsv I'm having this problem in 2023 with latest docker image. I don't understand your final comment here about the image editor and I wanted to understand what that means. My use case is like freddyli's I believe, this doesn't involve any editting in next cloud. I export files from lightroom to an external storage folder in nextcloud, then later after my family have selected pictures I do more involved edits and then export them from lightroom again. Nothing I can do in nextcloud seems to get the viewer to show the updated files even though downloading gets the new file of course. Incognito or even a second computer does not help so I don't think this is browser cache. I run preview:generate-all and it lists all the files as being updated but still I see the wrong image. if I turn off previews for the folder then when I view the file it is correct but this prevents using thumbnails and slows down the viewing. Very frustrating. I don't want to frequently delete my previews folder as I have thousands of images. Any suggestions? |
Describe the bug
When I replace once image in NextCloud, I view image by viewer, it do not change image in spite of I change content of changed image.
The text was updated successfully, but these errors were encountered: