Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

s3: fix multipart upload and server side copy when using bucket policy SSE-C

Albin Parou70226cc65370
diff --git a/backend/s3/s3.go b/backend/s3/s3.go
index fefdd6e96..7ac4ac729 100644
--- a/backend/s3/s3.go
+++ b/backend/s3/s3.go
@@ -5061,8 +5061,11 @@ func (f *Fs) copyMultipart(ctx context.Context, copyReq *s3.CopyObjectInput, dst
MultipartUpload: &types.CompletedMultipartUpload{
Parts: parts,
},
- RequestPayer: req.RequestPayer,
- UploadId: uid,
+ RequestPayer: req.RequestPayer,
+ SSECustomerAlgorithm: req.SSECustomerAlgorithm,
+ SSECustomerKey: req.SSECustomerKey,
+ SSECustomerKeyMD5: req.SSECustomerKeyMD5,
+ UploadId: uid,
})
return f.shouldRetry(ctx, err)
})
@@ -6446,8 +6449,11 @@ func (w *s3ChunkWriter) Close(ctx context.Context) (err error) {
MultipartUpload: &types.CompletedMultipartUpload{
Parts: w.completedParts,
},
- RequestPayer: w.multiPartUploadInput.RequestPayer,
- UploadId: w.uploadID,
+ RequestPayer: w.multiPartUploadInput.RequestPayer,
+ SSECustomerAlgorithm: w.multiPartUploadInput.SSECustomerAlgorithm,
+ SSECustomerKey: w.multiPartUploadInput.SSECustomerKey,
+ SSECustomerKeyMD5: w.multiPartUploadInput.SSECustomerKeyMD5,
+ UploadId: w.uploadID,
})
return w.f.shouldRetry(ctx, err)
})