Fix browser showing compressed instead of actual object size (#8412)

Fixes #8930
This commit is contained in:
Kaan Kabalak 2019-10-18 05:51:52 -07:00 committed by kannappanr
parent fce2d6ddd1
commit 140a7eadb4

View File

@ -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
}
}