16

We know that Dropbox desktop clients use a binary diff algorithm to break down all files into blocks, and only upload blocks that it doesn't already have in the cloud (https://serverfault.com/questions/52861/how-does-dropbox-version-upload-large-files).

Nevertheless, the Dropbox API, as far as I see, can only upload the whole file (/files_put, /files (POST)) when a sync is needed.

Is there any way to do differential/incremental syncing using the Dropbox API, i.e. upload only the changed portion of the file like the desktop clients do?

If this is not possible, then what are the best practices to periodically sync large files that has small changes using the Dropbox API?

Community
  • 1
  • 1
Imre Kelényi
  • 22,113
  • 5
  • 35
  • 45
  • 1
    Great Question -- did you ever find an answer? – DoctorG Nov 28 '12 at 04:27
  • 1
    Unfortunately not. I will get back to this post if I find anything relevant. – Imre Kelényi Nov 29 '12 at 14:22
  • 1
    AFAIK, you can download files by blocks using HTTP range retrieval request (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.2) Dropbox HTTP API supports it (at least for downloading files), not sure about for uploading. See more details on /files(GET) method: https://www.dropbox.com/developers/core/docs –  Jun 27 '13 at 13:57

1 Answers1

1

Unfortunately this isn't possible and I would suspect that it may never be available.

After doing a bit of research, I found a feature request for delta-syncing to be integrated into the API[*]. Dropbox hasn't responded, nor has the community upvoted this request.

I would make an educated guess that the reason why Dropbox hasn't provided this functionality, and likely never will, is because this is a dangerous feature in the hands of unknown developers.

Consider the case where you write an application that uses such a delta-change update system for updating large files. You thoroughly test your app and publish it to an app store. A couple of weeks after your initial release, and numerous downloads, you start receiving bad reviews and complaints because you managed to miss a very specific test case.

Within this specific, buggy case you've miscalculated a differential offset by 1-byte. Oh no! You've now corrupted thousands of files, for hundreds of users!

Considering such a possibility, I think I would personally request that Dropbox NEVER provide such a dev feature. If they integrated such a function into the API, they would be breaking their #1 purpose-- to provide consistent, safe, & reliable cloud backups of your important files.

[*]: This was the original reference location, but it is now a dead link.

(https://www.dropbox.com/votebox/1515/delta-sync-api-for-mobile-applications)

RLH
  • 15,230
  • 22
  • 98
  • 182
  • 6
    I don't agree with your conclusion: being able to make mistakes shouldn't be a reason not to provide such functionality. You can't (and shouldn't) babysit developers. As long as you don't make things dangerous on purpose, and provide nice warnings and remainders when things could be dangerous, then I don't see a problem in providing something like this. – Rodrigo Gómez Feb 06 '16 at 18:59
  • 3
    You can corrupt thousands of files just by usual upload or delete method, so i don't see any sense in your thoughts. – Alexander Danilov Aug 20 '18 at 10:48
  • 1
    As long as the responsibility for failure is clearly not on Dropbox's side, your example is not a problem for Dropbox. Anyway, I wish Dropbox would at least release an API to specify a chunk to be appended to a file, for which I would have a nice use case. – Walter Tross Apr 11 '20 at 22:07