One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
Brian S.53
9 years agoExplorer | Level 3
How do you track when only a file's contents have changed (API v2)
How would I track when a file's contents have changed remotely?
I've seen the "rev" value, but this also increments when the file is moved/renamed, and I'd like to ignore any changes not related to the content changing.
- Greg-DB
Dropbox Staff
The rev is currently the best way to track changes like this. If the rev hasn't changed, you know that the file contents have changed. If the rev has changed, the file contents may have changed.
The rev does change when a file is moved or renamed though, as you mentioned. It sounds like you'd be better suited by a hash of the file contents. The Dropbox API doesn't currently offer files hashes like this, but I'll be sure to pass this along as a feature request.
- Greg-DB
Dropbox Staff
The Dropbox API now offers a hash of file data that you can use to verify a file's contents. You can find it in FileMetadata.content_hash. It isn't a single MD5 or SHA1, but rather a combination of SHA256 hashes of the pieces of the file. You can find more information here:
https://www.dropbox.com/developers/reference/content-hash
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 2 hours 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!