mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 16:35:37 -05:00
fix(s3): Pass SSE-C parameters for multipart upload
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
a17d01951f
commit
ea575e342f
1 changed files with 5 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue