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

Roel V.'s avatar
Roel V.
Explorer | Level 3
8 years ago

API - downloading files bigger than 4GB

Are there any restrictions on the size of files downloaded via the HTTP API?

 

I have a QNAP NAS that tries to sync with my Dropbox account. About 340GB of it works fine; the last 50 GB (spread over 10 files) doesn't. All files that fail are bigger than 4GB. Through some spelunking in the filesystem of the NAS, I've found a log file that says , essentially 'socket is closed prematurely'. I don't have access to the code that is generating this message, nor do I have any first-hand experience writing code against the Dropbox API.

 

It seems to me that somewhere, someone is using a 32-bit integer to keep track of how much has already been downloaded and when that fails, the whole download fails. So, my question is (to try to find out on which side the problem is): is it possible to download files bigger than 4GB through the HTTP api, or should the application do something special (like chunked downloads or so)? Thanks

  •  

    There isn't a file size limit on downloads, but the HTTP requests themselves can time out if they take a long time. The "content-download endpoints", such as /2/files/download, do support Range Retrieval Requests though. That is a way of downloading portions of a file at a time, so it can be used to help avoid problems like this when downloading large files. This is something the developer of the app would need to implement.

     

    However, from the information you shared I can't be sure if that's the actual issue. Since you mentioned all of the failures occur over 4GB, the issue may actually be with the local filesystem itself. For example, I believe FAT32 only supports files up to 4GB. That's outside the scope of Dropbox API support though, so I can't offer much insight on that.

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

     

    There isn't a file size limit on downloads, but the HTTP requests themselves can time out if they take a long time. The "content-download endpoints", such as /2/files/download, do support Range Retrieval Requests though. That is a way of downloading portions of a file at a time, so it can be used to help avoid problems like this when downloading large files. This is something the developer of the app would need to implement.

     

    However, from the information you shared I can't be sure if that's the actual issue. Since you mentioned all of the failures occur over 4GB, the issue may actually be with the local filesystem itself. For example, I believe FAT32 only supports files up to 4GB. That's outside the scope of Dropbox API support though, so I can't offer much insight on that.

    • Roel V.'s avatar
      Roel V.
      Explorer | Level 3

      Thanks Greg, that's useful to know - and it gives me a convenient place to start looking in the documentation if it comes to having to convince the customer support rep they have to escalate. Since I posted I did a more thorough check of the data and it turns out there are no files between 1 and 4 gb (just a weird coincidence), so it could indeed still be a timeout issue.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,917 PostsLatest Activity: 11 days ago
334 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!