You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're seeing an issue where a TempFile used with an ActionDispatch::Http::UploadedFile is resulting in the filename= of the multipart body using the randomly generated filename of the Tempfile instead of the original_filename.
For example:
filename='test.txt'tempfile=Tempfile.open(filename)# creates /var/folders/sm/f8vxq1813p3913nwj9_qh7xs6js3gp/T/test.txt20180702-40300-7o0g19upload=ActionDispatch::Http::UploadedFile.new(tempfile: tempfile,filename: filename)upload.original_filename# => "test.txt" desired resultFile.basename(upload.path)# => "test.txt20180702-40300-dyj4fd" actual result
Hello!
We're seeing an issue where a TempFile used with an ActionDispatch::Http::UploadedFile is resulting in the
filename=
of the multipart body using the randomly generated filename of theTempfile
instead of theoriginal_filename
.For example:
Apparent root cause: https://github.com/jnunemaker/httparty/blob/master/lib/httparty/request/body.rb#L37
The text was updated successfully, but these errors were encountered: