diff --git a/lib/storage/file.js b/lib/storage/file.js index e1f8ad0ee2d..0cbd9102017 100644 --- a/lib/storage/file.js +++ b/lib/storage/file.js @@ -1107,7 +1107,8 @@ File.prototype.startResumableUpload_ = function(stream, metadata) { // Handle an error from API calls following the recommended best practices: // http://goo.gl/AajKku function handleError(err) { - if (err.code === 404) { + if (err.code === 404 && retries < RETRY_LIMIT) { + retries++; startUpload(); return; }