We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Joel T.9
10 years agoNew member | Level 2
FileMetadata checksum
Is there something better than file size to use as a checksum?
Maybe Sha1 or MD5? I didn't see one on the FileMetadata class. It appears "Rev" changes even when the contents haven't changed (ie. on file rename)
17 Replies
Replies have been turned off for this discussion
- Greg-DB9 years ago
Dropbox Community Moderator
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 - Team F.19 years agoExplorer | Level 4
That is good news, is the content_hash available on the Java API?
- Greg-DB9 years ago
Dropbox Community Moderator
Yes, in the official Dropbox API v2 Java SDK it's available as FileMetadata.contentHash.
- cro9 years agoExplorer | Level 3
Hi!
Is there any reason why content_hash, which was introduced in version 3.0.0, has been removed in version 3.0.1?ref. https://mvnrepository.com/artifact/com.dropbox.core/dropbox-core-sdk
- Greg-DB9 years ago
Dropbox Community Moderator
Thanks for the report! I believe this is a known issue with the Java SDK release right now. The team is looking into it, and I'll follow up here once I have an update for you. - Greg-DB9 years ago
Dropbox Community Moderator
This should be fixed in the latest release of the SDK, v3.0.2. Please update and let me know if you're still seeing any issues. - cro9 years agoExplorer | Level 3
I have now updated to version 3.0.2 and everything seems to work as expected. Thanks so much for your feedback.
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!