One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
Jostein J.
5 years agoHelpful | Level 5
How can I update client_modified for a file through the API?
I would like to update all the client_modified timestamps of my media files so that the image gallery app I'm using sorts the files in correct chronological order (it uses client_modified, and not exif data or similar for sorting). I would think this should be possible somehow but I can't figure out how.
Is it possible? The only workaround I know of is to temporarily move the file(s) to another folder (outside of Dropbox), then wait for Dropbox to register it as deleted, and then move the file(s) bak into the folder they were.
I'm using the Python SDK.
- Greg-DB
Dropbox Staff
This is technically possible, but there are a few complicating factors:
- The only way to update client_modified is to perform an upload of the file with client_modified set.
- If you upload the same exact file data to an existing file, Dropbox won't consider this a change (since the file data didn't change) and so won't commit new metadata (such as an updated client_modified).
That being the case, you can make these changes, but you'll need to do so like you described, that is, by performing the upload with client_modified set, but as a new or changed file. (I'll send this along as a feature request for an easier/more efficient way to do this, but I can't promise if or when that might be implemented.)
- Jostein J.Helpful | Level 5Thanks!
That would be quite useful to have in the API.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 5 days ago
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!