diff --git a/lib/hello_sign/client.rb b/lib/hello_sign/client.rb index b54fa4e..99a7f5a 100644 --- a/lib/hello_sign/client.rb +++ b/lib/hello_sign/client.rb @@ -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"