mirror of
https://github.com/pgsty/minio.git
synced 2026-08-10 00:03:29 +03: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
+4
-2
@@ -296,11 +296,13 @@ func (xl xlObjects) PutObject(bucket string, object string, size int64, data io.
|
||||
}
|
||||
|
||||
// Erasure code and write across all disks.
|
||||
newEInfos, err := erasureCreateFile(onlineDisks, minioMetaBucket, tempErasureObj, "object1", teeReader, eInfos)
|
||||
newEInfos, n, err := erasureCreateFile(onlineDisks, minioMetaBucket, tempErasureObj, "object1", teeReader, eInfos)
|
||||
if err != nil {
|
||||
return "", toObjectErr(err, minioMetaBucket, tempErasureObj)
|
||||
}
|
||||
|
||||
if size == -1 {
|
||||
size = n
|
||||
}
|
||||
// Save additional erasureMetadata.
|
||||
modTime := time.Now().UTC()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user