mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Apply partNumber checks only on multipart objects (#9528)
This commit is contained in:
parent
24f20eb1bd
commit
7290d23b26
@ -172,7 +172,7 @@ func checkPreconditions(ctx context.Context, w http.ResponseWriter, r *http.Requ
|
||||
}
|
||||
|
||||
// Check if the part number is correct.
|
||||
if opts.PartNumber > 0 && opts.PartNumber != len(objInfo.Parts) {
|
||||
if opts.PartNumber > 0 && len(objInfo.Parts) > 0 && opts.PartNumber != len(objInfo.Parts) {
|
||||
writeHeaders()
|
||||
writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrPreconditionFailed), r.URL, guessIsBrowserReq(r))
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user