Multipart upload compatibility with 1.8.7
This commit is contained in:
parent
7545efddb6
commit
0d4eaf3bbf
|
@ -66,9 +66,9 @@ module Google
|
||||||
:request => { :boundary => MULTIPART_BOUNDARY }
|
:request => { :boundary => MULTIPART_BOUNDARY }
|
||||||
}
|
}
|
||||||
multipart = Faraday::Request::Multipart.new
|
multipart = Faraday::Request::Multipart.new
|
||||||
self.body = multipart.create_multipart(env, {
|
self.body = multipart.create_multipart(env, [
|
||||||
:metadata => Faraday::UploadIO.new(metadata, 'application/json'),
|
[nil,Faraday::UploadIO.new(metadata, 'application/json', 'file.json')],
|
||||||
:content => self.media})
|
[nil, self.media]])
|
||||||
self.headers.update(env[:request_headers])
|
self.headers.update(env[:request_headers])
|
||||||
when "resumable"
|
when "resumable"
|
||||||
file_length = self.media.length
|
file_length = self.media.length
|
||||||
|
|
Loading…
Reference in New Issue