|
|
@ -2692,7 +2692,9 @@ func (api objectAPIHandlers) PutObjectLegalHoldHandler(w http.ResponseWriter, r |
|
|
|
objInfo.metadataOnly = true |
|
|
|
objInfo.metadataOnly = true |
|
|
|
if _, err = objectAPI.CopyObject(ctx, bucket, object, bucket, object, objInfo, ObjectOptions{ |
|
|
|
if _, err = objectAPI.CopyObject(ctx, bucket, object, bucket, object, objInfo, ObjectOptions{ |
|
|
|
VersionID: opts.VersionID, |
|
|
|
VersionID: opts.VersionID, |
|
|
|
}, ObjectOptions{}); err != nil { |
|
|
|
}, ObjectOptions{ |
|
|
|
|
|
|
|
VersionID: opts.VersionID, |
|
|
|
|
|
|
|
}); err != nil { |
|
|
|
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r)) |
|
|
|
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r)) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
@ -2850,7 +2852,9 @@ func (api objectAPIHandlers) PutObjectRetentionHandler(w http.ResponseWriter, r |
|
|
|
objInfo.metadataOnly = true // Perform only metadata updates.
|
|
|
|
objInfo.metadataOnly = true // Perform only metadata updates.
|
|
|
|
if _, err = objectAPI.CopyObject(ctx, bucket, object, bucket, object, objInfo, ObjectOptions{ |
|
|
|
if _, err = objectAPI.CopyObject(ctx, bucket, object, bucket, object, objInfo, ObjectOptions{ |
|
|
|
VersionID: opts.VersionID, |
|
|
|
VersionID: opts.VersionID, |
|
|
|
}, ObjectOptions{}); err != nil { |
|
|
|
}, ObjectOptions{ |
|
|
|
|
|
|
|
VersionID: opts.VersionID, |
|
|
|
|
|
|
|
}); err != nil { |
|
|
|
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r)) |
|
|
|
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r)) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|