cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do you track when only a file's contents have changed (API v2)

How do you track when only a file's contents have changed (API v2)

Brian S.53
Explorer | Level 3

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.

2 Replies 2

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
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?