From 51866fbd34b01574090365a02d8480093174f076 Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Wed, 5 Jul 2017 18:51:04 +0200 Subject: [PATCH] drive: add missing seek to start on retries of chunked uploads follow up to ee13bc67756213ea488f3cf3dc320af12f57989b --- drive/upload.go | 1 + 1 file changed, 1 insertion(+) diff --git a/drive/upload.go b/drive/upload.go index 6a9d4f420..9c0032462 100644 --- a/drive/upload.go +++ b/drive/upload.go @@ -157,6 +157,7 @@ func (rx *resumableUpload) transferStatus() (start int64, err error) { // Transfer a chunk - caller must call googleapi.CloseBody(res) if err == nil || res != nil func (rx *resumableUpload) transferChunk(start int64, chunk io.ReadSeeker, chunkSize int64) (int, error) { + _, _ = chunk.Seek(0, 0) req := rx.makeRequest(start, chunk, chunkSize) res, err := rx.f.client.Do(req) if err != nil {