summaryrefslogtreecommitdiff
path: root/vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-02-13 07:46:15 +0000
committerLibravatar GitHub <noreply@github.com>2023-02-13 07:46:15 +0000
commitefbc5dab6a041e81fbf4c4eccbae43a7a9997566 (patch)
tree06f6dcbbf36065147a7984fd6c5b39ccec3c3f65 /vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go
parent[chore]: Bump golang.org/x/image from 0.3.0 to 0.4.0 (#1485) (diff)
downloadgotosocial-efbc5dab6a041e81fbf4c4eccbae43a7a9997566.tar.xz
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.47 to 7.0.48 (#1486)
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.47 to 7.0.48. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.47...v7.0.48) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go')
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go b/vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go
index cdc7d3d38..55b3f38e6 100644
--- a/vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go
+++ b/vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go
@@ -500,8 +500,6 @@ func (c *Client) putObjectMultipartStreamParallel(ctx context.Context, bucketNam
// CRC32C is ~50% faster on AMD64 @ 30GB/s
var crcBytes []byte
crc := crc32.New(crc32.MakeTable(crc32.Castagnoli))
- md5Hash := c.md5Hasher()
- defer md5Hash.Close()
// Total data read and written to server. should be equal to 'size' at the end of the call.
var totalUploadedSize int64
@@ -569,9 +567,10 @@ func (c *Client) putObjectMultipartStreamParallel(ctx context.Context, bucketNam
var md5Base64 string
if opts.SendContentMd5 {
- md5Hash.Reset()
+ md5Hash := c.md5Hasher()
md5Hash.Write(buf[:length])
md5Base64 = base64.StdEncoding.EncodeToString(md5Hash.Sum(nil))
+ md5Hash.Close()
}
defer wg.Done()
@@ -590,6 +589,7 @@ func (c *Client) putObjectMultipartStreamParallel(ctx context.Context, bucketNam
objPart, uerr := c.uploadPart(ctx, p)
if uerr != nil {
errCh <- uerr
+ return
}
// Save successfully uploaded part metadata.