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

Add multipart support #569

Merged
merged 6 commits into from
Feb 7, 2018

Conversation

TheSmartnik
Copy link
Collaborator

Hi,
This pull request fixes long-standing issue, of not handling file upload properly #52. No extra dependencies introduced. Tested file upload on rails server, works alright.

@jnunemaker
Copy link
Owner

Neat. I really don't know much about multipart uploads, but this seems simple and contained so I'm going to merge it. @TheSmartnik are you ok with me pinging you in the future if questions or other pull requests come up about this?

@jnunemaker jnunemaker merged commit a3d8528 into jnunemaker:master Feb 7, 2018
@TheSmartnik
Copy link
Collaborator Author

@jnunemaker sure, I'd be super happy to help

@TheSmartnik TheSmartnik deleted the add_multipart_support branch February 8, 2018 09:08
@jirutka
Copy link
Contributor

jirutka commented Feb 24, 2018

This implementation is broken – header Content-Type is not added when you pass any header into the request method.

The problem is that @raw_request.initialize_http_header(headers_hash) called few lines below (when options hash contains :headers) resets @header.

@TheSmartnik
Copy link
Collaborator Author

@jirutka oh, I see. Thanks a lot for feedback and pr

@wayne530
Copy link

wayne530 commented Apr 4, 2018

May be worth emphasizing for many folks that decided to use httmultiparty when on httparty < 0.16 that using >= 0.16 + httmultiparty causes issues and multi-part form data isn't properly encoded.

chrismaddocks added a commit to chrismaddocks/soundcloud-ruby that referenced this pull request May 30, 2018
httparty now supports multipart uploads, see jnunemaker/httparty#569
chrismaddocks added a commit to chrismaddocks/soundcloud-ruby that referenced this pull request May 30, 2018
httparty now supports multipart uploads, see jnunemaker/httparty#569
@siegy22 siegy22 mentioned this pull request Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants