From 66a1e15a8265df9caee4eb9233a938c48ee37fc9 Mon Sep 17 00:00:00 2001 From: Pascal Brogle Date: Sun, 7 Dec 2014 10:43:30 +0100 Subject: [PATCH] only upload media if there is one --- lib/google/api_client/request.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/google/api_client/request.rb b/lib/google/api_client/request.rb index a8a83c4a4..78ec87793 100644 --- a/lib/google/api_client/request.rb +++ b/lib/google/api_client/request.rb @@ -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" }