Skip to content

Commit

Permalink
Merge pull request googleapis#178 from simplysoft/master
Browse files Browse the repository at this point in the history
only upload media if there is one
  • Loading branch information
sqrrrl committed Dec 8, 2014
2 parents 16683c7 + 66a1e15 commit 95823b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/google/api_client/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def send(connection, is_retry = false)

# Resumamble slightly different than other upload protocols in that it requires at least
# 2 requests.
if result.status == 200 && self.upload_type == 'resumable'
if result.status == 200 && self.upload_type == 'resumable' && self.media
upload = result.resumable_upload
unless upload.complete?
logger.debug { "#{self.class} Sending upload body" }
Expand Down

0 comments on commit 95823b0

Please sign in to comment.