From 2478a699a2d7ebb0650093d933781ede2493a1f1 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 26 Jun 2015 17:25:42 -0400 Subject: [PATCH] storage - fix caching leak for resumable uploads --- lib/storage/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/storage/file.js b/lib/storage/file.js index d5f20e7531f..fe3502589f6 100644 --- a/lib/storage/file.js +++ b/lib/storage/file.js @@ -1391,7 +1391,7 @@ File.prototype.startResumableUpload_ = function(stream, metadata) { // byte of incoming data. if (bytesWritten === 0) { var cachedFirstChunk = config && config.firstChunk; - var firstChunk = chunk.slice(0, 16); + var firstChunk = chunk.slice(0, 16).valueOf(); if (!cachedFirstChunk) { // This is a new upload. Cache the first chunk.