diff options
author | Julius Härtl <jus@bitgrid.net> | 2023-06-21 18:32:24 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2023-06-21 18:32:24 +0200 |
commit | ea575e342f50e2bbedc0fae5feccdbb60131b9bd (patch) | |
tree | 9c492758810e7c6ccd5937bb0ab9daa82e166f98 /lib/private | |
parent | a17d01951fdf72a37036fe67cba4009b03b5723e (diff) | |
download | nextcloud-server-ea575e342f50e2bbedc0fae5feccdbb60131b9bd.tar.gz nextcloud-server-ea575e342f50e2bbedc0fae5feccdbb60131b9bd.zip |
fix(s3): Pass SSE-C parameters for multipart upload
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Files/ObjectStore/S3.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/Files/ObjectStore/S3.php b/lib/private/Files/ObjectStore/S3.php index 76eee2bc962..2d9119b5fc6 100644 --- a/lib/private/Files/ObjectStore/S3.php +++ b/lib/private/Files/ObjectStore/S3.php @@ -49,7 +49,7 @@ class S3 implements IObjectStore, IObjectStoreMultiPartUpload { $upload = $this->getConnection()->createMultipartUpload([ 'Bucket' => $this->bucket, 'Key' => $urn, - ]); + ] + $this->getSSECParameters()); $uploadId = $upload->get('UploadId'); if ($uploadId === null) { throw new Exception('No upload id returned'); @@ -65,7 +65,7 @@ class S3 implements IObjectStore, IObjectStoreMultiPartUpload { 'ContentLength' => $size, 'PartNumber' => $partId, 'UploadId' => $uploadId, - ]); + ] + $this->getSSECParameters()); } public function getMultipartUploads(string $urn, string $uploadId): array { @@ -80,12 +80,12 @@ class S3 implements IObjectStore, IObjectStoreMultiPartUpload { 'UploadId' => $uploadId, 'MaxParts' => 1000, 'PartNumberMarker' => $partNumberMarker - ]); + ] + $this->getSSECParameters()); $parts = array_merge($parts, $result->get('Parts') ?? []); $isTruncated = $result->get('IsTruncated'); $partNumberMarker = $result->get('NextPartNumberMarker'); } - + return $parts; } @@ -95,7 +95,7 @@ class S3 implements IObjectStore, IObjectStoreMultiPartUpload { 'Key' => $urn, 'UploadId' => $uploadId, 'MultipartUpload' => ['Parts' => $result], - ]); + ] + $this->getSSECParameters()); $stat = $this->getConnection()->headObject([ 'Bucket' => $this->bucket, 'Key' => $urn, |