Skip to content

Commit

Permalink
fix(s3): support SSE-C headers for the MultipartCopy call
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Zimmerer <[email protected]>
  • Loading branch information
ir0nhide committed Nov 10, 2023
1 parent 5183ba2 commit 8e6ef54
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/private/Files/ObjectStore/S3ObjectTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,20 @@ public function objectExists($urn) {
}

public function copyObject($from, $to, array $options = []) {
$sourceMetadata = $this->getConnection()->headObject([
'Bucket' => $this->getBucket(),
'Key' => $from,
] + $this->getSSECParameters());

$copy = new MultipartCopy($this->getConnection(), [
"source_bucket" => $this->getBucket(),
"source_key" => $from
], array_merge([
"bucket" => $this->getBucket(),
"key" => $to,
"acl" => "private",
"params" => $this->getSSECParameters() + $this->getSSECParameters(true)
"params" => $this->getSSECParameters() + $this->getSSECParameters(true),
"source_metadata" => $sourceMetadata
], $options));
$copy->copy();
}
Expand Down

0 comments on commit 8e6ef54

Please sign in to comment.