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: 

Re: Content hash calculation for data block size less then 4MB

Content hash calculation for data block size less then 4MB

Pankil
New member | Level 2

Is it necessary to split the file in to block of the 4MB to compute the correct hash? How can I calculate the content hash for the data block size less then 4MB?

1 Reply 1

Greg-DB
Dropbox Staff

It sounds like you're referring to calculating the "content_hash" value for a file in Dropbox as returned by the Dropbox API. You can find documentation and example code for this on the Content Hash page.

 

In order to calculate the value correctly, you need to follow the instructions there exactly. That includes always dividing the file into 4 MB pieces. For files smaller than 4 MB, the one (first/last) piece will be smaller than 4 MB. That's acceptable, and your code should proceed normally in that case, following the instructions to compute the value.

Need more support?