Skip to content

Commit e91c120

Browse files
authored
Merge pull request #585 from mcls/master
Support ActionDispatch::Http::UploadedFile again
2 parents db8df8c + 0719036 commit e91c120

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Unreleased
2+
3+
* [Support ActionDispatch::Http::UploadedFile again](https://github.com/jnunemaker/httparty/pull/585)
4+
15
## 0.16.1
26

37
* [Parse content with application/hal+json content type as JSON](https://github.com/jnunemaker/httparty/pull/573)

lib/httparty/request/body.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def generate_multipart
3232
multipart = normalized_params.inject('') do |memo, (key, value)|
3333
memo += "--#{boundary}\r\n"
3434
memo += %(Content-Disposition: form-data; name="#{key}")
35-
memo += %(; filename="#{File.basename(value)}") if file?(value)
35+
memo += %(; filename="#{File.basename(value.path)}") if file?(value)
3636
memo += "\r\n"
3737
memo += "Content-Type: application/octet-stream\r\n" if file?(value)
3838
memo += "\r\n"

0 commit comments

Comments
 (0)