1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

s3: add support for --upload-header If-Match and If-None-Match

The If-Match and If-None-Match headers were being dropped rather
than implemented in the Put Object request to S3. These headers
make requests conditional which allow AWS S3 Bucket Policies to
prevent Object overwriting.
This commit is contained in:
Sean Turner
2025-11-13 14:50:47 +01:00
committed by GitHub
parent 71138082ea
commit 83b83f7768

View File

@@ -4552,6 +4552,10 @@ func (o *Object) prepareUpload(ctx context.Context, src fs.ObjectInfo, options [
ui.req.ContentLanguage = aws.String(value)
case "content-type":
ui.req.ContentType = aws.String(value)
case "if-match":
ui.req.IfMatch = aws.String(value)
case "if-none-match":
ui.req.IfNoneMatch = aws.String(value)
case "x-amz-tagging":
ui.req.Tagging = aws.String(value)
default: