NebulousLabs / python-skynet

Library for integrating Skynet with Python applications
MIT License
19 stars 11 forks source link

Streaming uploads #39

Closed xloem closed 3 years ago

xloem commented 3 years ago

This is an extension on #36 to stream all files.

python-requests streams file objects and iterators if they are passed as post body content. I've changed all single file uploads to upload in that way.

mrcnski commented 3 years ago

Merge conflict needs to be resolved

xloem commented 3 years ago

Thanks. Resolved.

xloem commented 3 years ago

Sorry about all that, looks like I made an error rebasing. I think only the first change is relevant and don't immediately recognise the others. Consider a draft until addressed.

But if you want streaming to work basically you just pass a file object straight to a single file post just like with chunked uploading.

xloem commented 3 years ago

Sorry for misleading comment. The changes are to make the tests pass, after I changed single file uploads to be streaming. I also added tests that the body content is correct.

I added the comments you requested and lengthened the docstring.