diff --git a/lib/google/apis/core/upload.rb b/lib/google/apis/core/upload.rb index b7815c11e..08e2a67c6 100644 --- a/lib/google/apis/core/upload.rb +++ b/lib/google/apis/core/upload.rb @@ -138,6 +138,10 @@ module Google @state = :start @upload_url = nil @offset = 0 + # Prevent the command from populating the body with form encoding, by + # asserting that it already has a body. Form encoding is never used + # by upload requests. + self.body = '' unless self.body super end