Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
hemancuso
10 years agoExplorer | Level 3
API v2 - set metadata/mtime
With the API v2 preview underway, I'd really really love a way to set the mtime and other associated metadata for a particular file. Having it always stamped to whatever the server has makes developi...
Steve M.
Dropbox Staff
10 years agoWe'll certainly consider this, but I'm curious if you've considered keeping track of revs for syncing. This has a few advantages over using timestamps:
- It allows you to sync correctly with more than one computer (without having to have strict clock synchronization requirements).
- It allows you to sync correctly even if the time on the local computer changes (e.g. due to correcting clock drift or even things like leap seconds).
- It allows you to know when you can safely overwrite a file in Dropbox. (With just a timestamp, you can't tell whether or not a file was modified in the cloud since the last time you uploaded, so you don't know if an overwrite might destroy work from another computer. A conditional upload with a parent rev also avoids clobbering a file in a race condition where the file is modified remotely during an upload.)
FYI, I'm pretty sure the Dropbox desktop client never uses the client modified time at all (though it does set it so it matches the local filesystem).
I suppose the downside of using the rev is that you have to keep track locally of what the rev of each file was the last time you uploaded/downloaded, but this is a small bit of information to track per file and helps avoid correctness issues with your syncing (that could lead to data loss).
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!