From 2579edbc6088b642de78343bc8c3208c6542d273 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 23 Oct 2020 10:05:40 -0700 Subject: [PATCH] fix bug found by tests --- weed/operation/upload_content.go | 1 + 1 file changed, 1 insertion(+) diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go index 60fc0c049..df46627c3 100644 --- a/weed/operation/upload_content.go +++ b/weed/operation/upload_content.go @@ -88,6 +88,7 @@ func doUpload(uploadUrl string, filename string, cipher bool, reader io.Reader, err = fmt.Errorf("read input: %v", err) return } + data = buf.Bytes() } uploadResult, uploadErr := retriedUploadData(uploadUrl, filename, cipher, data, isInputCompressed, mtype, pairMap, jwt) return uploadResult, uploadErr, data