You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

bramburn's avatar
bramburn
Explorer | Level 3
6 years ago

Problem with file integrity when uploaded

Hello there,

I am getting an issue with the files uploaded via the API.

the Dropbox hash differ from the original and uploaded.

(venv34) Kapss-MacBook-Pro:python bramburn$ python hash_file.py /Users/bramburn/Desktop/Toc1012.fls
d2d3e87285f85ffaa8ddf0870a46bb2e580a293e32ba20a155317654479dfb2c
(venv34) Kapss-MacBook-Pro:python bramburn$ python hash_file.py /Users/bramburn/Downloads/Toc1012.fls
85b64345dbb99010eeb4e7a61bc61a99c45c595a0ba594b090b9ebad5daf8c0d
(venv34) Kapss-MacBook-Pro:python bramburn$ 

The file in /Downloads/ is the web downloaded toc1012.fls file, the file in the /Desktop/ is the original.

The file is different.

I also tried a shasum as follows with two different file and I am getting an issue with the file:

Kapss-MacBook-Pro:~ bramburn$ shasum /Users/bramburn/Downloads/Toc1008.fls 
f44df7db8f9321145a7b091fd0d25b107521d998  /Users/bramburn/Downloads/Toc1008.fls
Kapss-MacBook-Pro:~ bramburn$ shasum /Users/bramburn/Downloads/Toc1008.fls 
f44df7db8f9321145a7b091fd0d25b107521d998  /Users/bramburn/Downloads/Toc1008.fls
Kapss-MacBook-Pro:~ bramburn$ shasum /Users/bramburn/Desktop/Toc1008.fls 
ba728834eeecd6eb3dfaa5508e43815c15c07f45  /Users/bramburn/Desktop/Toc1008.fls
Kapss-MacBook-Pro:~ bramburn$ shasum /Users/bramburn/Downloads/Toc1012.fls 
4a1b522c8f5e31ed7e1d69feec5f273775b32609  /Users/bramburn/Downloads/Toc1012.fls
Kapss-MacBook-Pro:~ bramburn$ shasum /Users/bramburn/Downloads/Toc1012.fls 
4a1b522c8f5e31ed7e1d69feec5f273775b32609  /Users/bramburn/Downloads/Toc1012.fls
Kapss-MacBook-Pro:~ bramburn$ shasum /Users/bramburn/Desktop/Toc1012.fls 
5d8c75382de48bdbd25c78d20a923e869049a8a8  /Users/bramburn/Desktop/Toc1012.fls
Kapss-MacBook-Pro:~ bramburn$ 

Anyone know how to resolve this when uploading files? or making sure it is the same?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Apologies for the delay! It looks like your post got caught in the forum's spam filter for some reason. It was just restored.

    Anyway, can you share the code you're using to upload the files in this case? It sounds like something may be going wrong during the upload resulting in the incorrect data getting committed.

    • bramburn's avatar
      bramburn
      Explorer | Level 3

      hi Greg, i was able to resolve this. For some reason the f.tell() was off for the offset.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 3 days ago
333 Following

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!