lib/hello_sign/client.rb in hellosign-ruby-sdk-3.0.14 vs lib/hello_sign/client.rb in hellosign-ruby-sdk-3.0.15
- old
+ new
@@ -188,10 +188,10 @@
def prepare_files(opts)
if opts[:files]
opts[:files].each_with_index do |file, index|
if file.is_a? String
- opts[:"file[#{index}]"] = Faraday::UploadIO.new(file, 'application/pdf')
+ opts[:"file[#{index}]"] = Faraday::UploadIO.new(StringIO.new(file), 'application/pdf')
elsif defined? ActionDispatch::Http::UploadedFile
if file.is_a? ActionDispatch::Http::UploadedFile
opts[:"file[#{index}]"] = UploadIO.new(file.tempfile, 'application/pdf')
end
else