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

Fixes #8930
master
Kaan Kabalak 5 years ago committed by kannappanr
parent fce2d6ddd1
commit 140a7eadb4
  1. 6
      cmd/web-handlers.go

@ -540,6 +540,12 @@ func (web *webAPIHandlers) ListObjects(r *http.Request, args *ListObjectsArgs, r
if err != nil { if err != nil {
return toJSONError(ctx, err) 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…
Cancel
Save