How to stream a very large file to Dropbox using python v2 api

551 views Asked by At

Background

I finally convinced someone willing to share his full archival node 5868GiB database for free (which now requires to be built in ram and thus requires 100000$ worth of ram in order to be built but can be run on an ssd once done).

However he want to send it only through sending a single tar file over raw tcp using a rather slow (400Mps) connection for this task.
I m needing to get it on dropbox and as a result, he don’t want to use the https://www.dropbox.com/request/[my upload key here] allowing to upload files through a web browser without a dropbox account (it really annoyed him that I talked about using an other method or compressing the database to the point he is on the verge of changing his mind about sharing it).
Because on my side, dropbox allows using 10Tib of storage for free during 30 days and I didn’t receive the required ssd yet (so once received I will be able to download it using a faster speed).

The problem

I m fully aware of upload file to my dropbox from python script but in my case the file doesn t fit into a memory buffer not even on disk. And previously in api v1 it wasn t possible to append data to an exisiting file (but I didn t find the answer for v2).

1

There are 1 answers

1
Greg On

To upload a large file to the Dropbox API using the Dropbox Python SDK, you would use upload sessions to upload it in pieces. There's a basic example here.

Note that the Dropbox API only supports files up to 350 GB though.