when I upload photos to Nextcloud (28) and download them again via web the “created/modified” timestamp is changed to the date where i downloaded the file and not when it was really created the first time on my phone. Why is that happening? On the filesystem and in nextcloud it seems to be alright, but as soon as i download its messed up.
Any ideas?
When I download a file with a Browser (FF), it always sets the modification and creation date to the current time.
I just found with wget you can preserve the timestamp (Time-Stamping Usage (GNU Wget 1.25.0 Manual)) and for the browsers there are perhaps plugins to do this as well (there were some using external download managers, wget included).
I tried that it can keep the time stamp (with curl), so the information is there and transmitted, just the browser will not use it.
yes, it’s the way browsers currently operate. You have to contact them if you want to change their behavior and/or use plugins if possible.
For a file you have different timestamps, one when it was created, one when its content was modified, and one when it was last accessed. With wget, curl, you can also download and preserve the modification time (perhaps access time as well). And Nextcloud supports this.
The issue occurs because downloading files via the Nextcloud web interface updates the “created/modified” timestamps to the download time. This is common behavior for web servers.
To resolve this:
Use the Nextcloud desktop sync client or mobile app for uploads and downloads, as they preserve timestamps.
Check your WebDAV client settings to ensure metadata is preserved.
Look into Nextcloud apps or settings that may alter file metadata.
Consider using a script or API to restore original timestamps after downloading.
These methods should help maintain the correct timestamps.