Adapt multipart upload to use sse-kms parameters

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2021-06-02 15:33:12 +02:00
parent c62afe0128
commit b45ba6a94b
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ class S3 implements IObjectStore, IObjectStoreMultiPartUpload {
$upload = $this->getConnection()->createMultipartUpload([ $upload = $this->getConnection()->createMultipartUpload([
'Bucket' => $this->bucket, 'Bucket' => $this->bucket,
'Key' => $urn, 'Key' => $urn,
]); ] + $this->getSseKmsPutParameters());
$uploadId = $upload->get('UploadId'); $uploadId = $upload->get('UploadId');
if ($uploadId === null) { if ($uploadId === null) {
throw new Exception('No upload id returned'); throw new Exception('No upload id returned');
@ -74,7 +74,7 @@ class S3 implements IObjectStore, IObjectStoreMultiPartUpload {
'Key' => $urn, 'Key' => $urn,
'UploadId' => $uploadId, 'UploadId' => $uploadId,
'MultipartUpload' => ['Parts' => $result], 'MultipartUpload' => ['Parts' => $result],
]); ] + $this->getSseKmsPutParameters());
$stat = $this->getConnection()->headObject([ $stat = $this->getConnection()->headObject([
'Bucket' => $this->bucket, 'Bucket' => $this->bucket,
'Key' => $urn, 'Key' => $urn,