python-api icon indicating copy to clipboard operation
python-api copied to clipboard

Support uploading files without using multi-part form posts

Open twindan opened this issue 5 years ago • 0 comments

The current implementation of addMedia() uses a multi-part form post to upload the file. The problem is that the Python requests library will load the entire file into memory when it is uploaded this way. If you are trying to upload a 2 GB video when someone has 32-bit python installed, it will run out of memory. On 64-bit Pythons it won't, but it will consume a large amount of memory.

Ideally, the API could support using streaming uploads.

twindan avatar Sep 25 '19 06:09 twindan