Set etag properly to calculated value if available (#5106)

Fixes #5100
This commit is contained in:
Harshavardhana
2017-10-24 12:25:42 -07:00
committed by Dee Koder
parent 758d5458f0
commit 5eb210dd2e
6 changed files with 26 additions and 18 deletions

View File

@@ -17,6 +17,7 @@
package cmd
import (
"encoding/hex"
"fmt"
"io"
"os"
@@ -571,7 +572,7 @@ func (fs fsObjects) PutObjectPart(bucket, object, uploadID string, partID int, d
return pi, toObjectErr(err, minioMetaMultipartBucket, partPath)
}
md5hex := data.MD5HexString()
md5hex := hex.EncodeToString(data.MD5Current())
// Save the object part info in `fs.json`.
fsMeta.AddObjectPart(partID, partSuffix, md5hex, data.Size())