Skip to content

Commit

Permalink
Add comment for action dispatch support
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunemaker committed Mar 30, 2018
1 parent e91c120 commit 683eacf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/httparty/request/body.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def generate_multipart
multipart = normalized_params.inject('') do |memo, (key, value)|
memo += "--#{boundary}\r\n"
memo += %(Content-Disposition: form-data; name="#{key}")
# value.path is used to support ActionDispatch::Http::UploadedFile
# https://github.com/jnunemaker/httparty/pull/585
memo += %(; filename="#{File.basename(value.path)}") if file?(value)
memo += "\r\n"
memo += "Content-Type: application/octet-stream\r\n" if file?(value)
Expand Down

0 comments on commit 683eacf

Please sign in to comment.