Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamed uploads #201

Closed
mpol opened this issue Feb 5, 2014 · 7 comments
Closed

Streamed uploads #201

mpol opened this issue Feb 5, 2014 · 7 comments
Labels
enhancement New feature or enhancement

Comments

@mpol
Copy link

mpol commented Feb 5, 2014

It would be sometimes very nice to be able to PUT a large file without buffering it first.
And it seems that requests supports the chunked encoding well: http://docs.python-requests.org/en/latest/user/advanced/#chunk-encoded-requests

Creating a generator in _body_from_file if a --chunked option is set seems simple enough, but I guess something would have to be done for --print=B to work (or maybe suppress the output with a reasonable message - since the (or at least my) use case would be large, generally binary, files).

@jkbrzt
Copy link
Member

jkbrzt commented Feb 5, 2014

👍 planning on implementing this soon

@jkbrzt jkbrzt changed the title support sending redirected input without buffering (chunked) Streamed uploads Feb 12, 2015
@sigmavirus24
Copy link

Stupid question: is there a way to do multipart/form-data uploads with httpie? If so, you'll want to stream those eventually too and there's a bunch of utilities in the requests-toolbelt to help with this including a way to monitor the upload of a streamed multipart/form-data request.

@jkbrzt
Copy link
Member

jkbrzt commented Feb 12, 2015

@sigmavirus24 yep, you can upload files as well:

$ http -f POST example.com/jobs name='John Smith' cv@~/Documents/cv.pdf

I'll take a look at the features provided by requests-toolbelt. Thanks for the tip!

@overheadhunter
Copy link

Just to be sure, as I don't want to create a duplicate ticket: When I try to upload big files (2GB), I get the following error:

http: error: ConnectionError: ('Connection aborted.', error(22, 'Invalid argument'))

I think this is related to this issue, as the file can not be uploaded chunked yet, isn't it?

@jkbrzt
Copy link
Member

jkbrzt commented Mar 7, 2016

Upstream issues:

@jkbrzt
Copy link
Member

jkbrzt commented Jun 8, 2020

Related #684 #685

jkbrzt added a commit that referenced this issue Aug 15, 2020
@jkbrzt jkbrzt closed this as completed in 6925d93 Sep 28, 2020
@jkbrzt
Copy link
Member

jkbrzt commented Sep 28, 2020

Streamed uploads are implemented in master. It will be included in v2.3.0. If you’d like try it out before the release: https://httpie.org/docs#unstable-version

@jkbrzt jkbrzt removed the planned Solution is being worked on label Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants