Skip to content

Commit

Permalink
Merge pull request #41366 from ir0nhide/fix/multipart-copy-ssec
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Nov 15, 2023
2 parents 04a4a77 + cdf96fa commit 830d85b
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 830d85b

Please sign in to comment.