Multipart upload compatibility with 1.8.7

This commit is contained in:
Steven Bazyl 2012-03-13 14:39:44 -07:00 committed by Bob Aman
parent eec8c167cb
commit 11bae1fde0
1 changed files with 5 additions and 5 deletions

View File

@ -66,9 +66,9 @@ module Google
:request => { :boundary => MULTIPART_BOUNDARY }
}
multipart = Faraday::Request::Multipart.new
self.body = multipart.create_multipart(env, {
:metadata => Faraday::UploadIO.new(metadata, 'application/json'),
:content => self.media})
self.body = multipart.create_multipart(env, [
[nil,Faraday::UploadIO.new(metadata, 'application/json', 'file.json')],
[nil, self.media]])
self.headers.update(env[:request_headers])
when "resumable"
file_length = self.media.length