From 57b9fff9047c680fa8737f2bc0c53a8423ed7727 Mon Sep 17 00:00:00 2001 From: sandeepkru Date: Thu, 6 Sep 2018 05:45:17 -0700 Subject: [PATCH] azureblob - BugFix - Incorrect StageBlock invocation in multi-part uploads fixes #2518. Incorrect formation of block list. --- backend/azureblob/azureblob.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/azureblob/azureblob.go b/backend/azureblob/azureblob.go index bd3f5211d..a6701c901 100644 --- a/backend/azureblob/azureblob.go +++ b/backend/azureblob/azureblob.go @@ -1068,7 +1068,7 @@ func (o *Object) uploadMultipart(in io.Reader, size int64, blob *azblob.BlobURL, var ( rawID uint64 blockID = "" // id in base64 encoded form - blocks = make([]string, totalParts) + blocks []string ) // increment the blockID @@ -1129,7 +1129,7 @@ outer: bufferReader := bytes.NewReader(buf) wrappedReader := wrap(bufferReader) rs := readSeeker{wrappedReader, bufferReader} - _, err = blockBlobURL.StageBlock(ctx, blockID, rs, ac) + _, err = blockBlobURL.StageBlock(ctx, blockID, &rs, ac) return o.fs.shouldRetry(err) })