lib/tessa/upload/uploads_file.rb in tessa-0.9.0 vs lib/tessa/upload/uploads_file.rb in tessa-0.9.1
- old
+ new
@@ -5,19 +5,16 @@
@upload = upload
@connection = connection
end
def call(file)
- params = { file: Faraday::UploadIO.new(file, "application/octet-stream") }
connection
- .public_send(upload.upload_method, upload.upload_url, params)
+ .public_send(upload.upload_method, upload.upload_url, File.read(file))
.success?
end
def self.connection_factory
Faraday.new do |conn|
- conn.request :multipart
- conn.request :url_encoded
conn.adapter Faraday.default_adapter
end
end
end