Skip to content

Commit 9f282f7

Browse files
Bump to version 2.0.1
Fixes an important issue with computing MD5 and Sha256 during FPutObject.
1 parent 90a23af commit 9f282f7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

api-put-object-common.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"fmt"
2121
"hash"
2222
"io"
23+
"io/ioutil"
2324
"math"
2425
"os"
2526
)
@@ -201,9 +202,9 @@ func (c Client) getUploadID(bucketName, objectName, contentType string) (uploadI
201202

202203
// computeHash - Calculates hashes for an input read Seeker.
203204
func computeHash(hashAlgorithms map[string]hash.Hash, hashSums map[string][]byte, reader io.ReadSeeker) (size int64, err error) {
204-
var hashWriter io.Writer
205+
hashWriter := ioutil.Discard
205206
for _, v := range hashAlgorithms {
206-
hashWriter = io.MultiWriter(v)
207+
hashWriter = io.MultiWriter(hashWriter, v)
207208
}
208209

209210
// If no buffer is provided, no need to allocate just use io.Copy.

api.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ type Client struct {
7373
// Global constants.
7474
const (
7575
libraryName = "minio-go"
76-
libraryVersion = "2.0.0"
76+
libraryVersion = "2.0.1"
7777
)
7878

7979
// User Agent should always following the below style.

0 commit comments

Comments
 (0)