python-api
python-api copied to clipboard
Support uploading files without using multi-part form posts
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.