mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
XL/PutObject: Calculate size if not provided by the client and update xl.json with the correct size. (#1844)
This commit is contained in:
committed by
Harshavardhana
parent
fb95c1fad3
commit
b00ac40c35
@@ -337,11 +337,13 @@ func (xl xlObjects) putObjectPart(bucket string, object string, uploadID string,
|
||||
}
|
||||
|
||||
// Erasure code data and write across all disks.
|
||||
newEInfos, err := erasureCreateFile(onlineDisks, minioMetaBucket, tmpPartPath, partSuffix, teeReader, eInfos)
|
||||
newEInfos, n, err := erasureCreateFile(onlineDisks, minioMetaBucket, tmpPartPath, partSuffix, teeReader, eInfos)
|
||||
if err != nil {
|
||||
return "", toObjectErr(err, minioMetaBucket, tmpPartPath)
|
||||
}
|
||||
|
||||
if size == -1 {
|
||||
size = n
|
||||
}
|
||||
// Calculate new md5sum.
|
||||
newMD5Hex := hex.EncodeToString(md5Writer.Sum(nil))
|
||||
if md5Hex != "" {
|
||||
|
||||
Reference in New Issue
Block a user