only upload media if there is one

This commit is contained in:
Pascal Brogle 2014-12-07 10:43:30 +01:00
parent 16683c7dc3
commit 66a1e15a82
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ module Google
# 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" }