Skip to content

Commit

Permalink
Merge pull request #585 from mcls/master
Browse files Browse the repository at this point in the history
Support ActionDispatch::Http::UploadedFile again
  • Loading branch information
jnunemaker authored Mar 30, 2018
2 parents db8df8c + 0719036 commit e91c120
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Unreleased

* [Support ActionDispatch::Http::UploadedFile again](https://github.com/jnunemaker/httparty/pull/585)

## 0.16.1

* [Parse content with application/hal+json content type as JSON](https://github.com/jnunemaker/httparty/pull/573)
Expand Down
2 changes: 1 addition & 1 deletion lib/httparty/request/body.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def generate_multipart
multipart = normalized_params.inject('') do |memo, (key, value)|
memo += "--#{boundary}\r\n"
memo += %(Content-Disposition: form-data; name="#{key}")
memo += %(; filename="#{File.basename(value)}") if file?(value)
memo += %(; filename="#{File.basename(value.path)}") if file?(value)
memo += "\r\n"
memo += "Content-Type: application/octet-stream\r\n" if file?(value)
memo += "\r\n"
Expand Down

0 comments on commit e91c120

Please sign in to comment.