mirror of https://github.com/minio/minio.git
Fix browser showing compressed instead of actual object size (#8412)
Fixes #8930
This commit is contained in:
parent
fce2d6ddd1
commit
140a7eadb4
|
@ -540,6 +540,12 @@ func (web *webAPIHandlers) ListObjects(r *http.Request, args *ListObjectsArgs, r
|
|||
if err != nil {
|
||||
return toJSONError(ctx, err)
|
||||
}
|
||||
} else if lo.Objects[i].IsCompressed() {
|
||||
var actualSize int64 = lo.Objects[i].GetActualSize()
|
||||
if actualSize < 0 {
|
||||
return toJSONError(ctx, errInvalidDecompressedSize)
|
||||
}
|
||||
lo.Objects[i].Size = actualSize
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue