Add docs for bucket quota feature (#9503)

This PR also adds a check to not enforce
bucket quota for server-side metadata copy
of an object onto itself.
This commit is contained in:
poornas
2020-05-16 19:27:33 -07:00
committed by GitHub
parent daf4418cbb
commit 011a2c0b78
3 changed files with 50 additions and 3 deletions

View File

@@ -879,9 +879,11 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re
}
length = actualSize
}
if err := enforceBucketQuota(ctx, dstBucket, actualSize); err != nil {
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r))
return
if !cpSrcDstSame {
if err := enforceBucketQuota(ctx, dstBucket, actualSize); err != nil {
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r))
return
}
}
var compressMetadata map[string]string