Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #96 from binti-family/preserve-upload-filename
Browse files Browse the repository at this point in the history
Preserve original filename on UploadedFiles
  • Loading branch information
jyoung488 committed Sep 11, 2018
2 parents 912c4bf + 7f70457 commit 333a705
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hello_sign/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def prepare_files(opts)
elsif defined? ActionDispatch::Http::UploadedFile
if file.is_a? ActionDispatch::Http::UploadedFile
mime_type = MIMEfromIO file
opts[:"file[#{index}]"] = UploadIO.new(file.tempfile, mime_type)
opts[:"file[#{index}]"] = UploadIO.new(file.tempfile, mime_type, file.original_filename)
end
else
raise HelloSign::Error::NotSupportedType.new "#{file.class} is not a supported. Must be a string or ActionDispatch::Http::UploadedFile"
Expand Down

0 comments on commit 333a705

Please sign in to comment.