From 8bec661288b276c98bdb0e773e5f4d5275dc4c87 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 20 Oct 2023 16:44:35 +0300 Subject: update AWK SDK --- vendor/aws/aws-sdk-php/src/S3/Transfer.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'vendor/aws/aws-sdk-php/src/S3/Transfer.php') diff --git a/vendor/aws/aws-sdk-php/src/S3/Transfer.php b/vendor/aws/aws-sdk-php/src/S3/Transfer.php index 68b6736..600f441 100644 --- a/vendor/aws/aws-sdk-php/src/S3/Transfer.php +++ b/vendor/aws/aws-sdk-php/src/S3/Transfer.php @@ -27,6 +27,7 @@ class Transfer implements PromisorInterface private $mupThreshold; private $before; private $s3Args = []; + private $addContentMD5; /** * When providing the $source argument, you may provide a string referencing @@ -134,6 +135,10 @@ class Transfer implements PromisorInterface $this->addDebugToBefore($options['debug']); } } + + // Handle "add_content_md5" option. + $this->addContentMD5 = isset($options['add_content_md5']) + && $options['add_content_md5'] === true; } /** @@ -141,7 +146,7 @@ class Transfer implements PromisorInterface * * @return PromiseInterface */ - public function promise() + public function promise(): PromiseInterface { // If the promise has been created, just return it. if (!$this->promise) { @@ -342,6 +347,7 @@ class Transfer implements PromisorInterface $args = $this->s3Args; $args['SourceFile'] = $filename; $args['Key'] = $this->createS3Key($filename); + $args['AddContentMD5'] = $this->addContentMD5; $command = $this->client->getCommand('PutObject', $args); $this->before and call_user_func($this->before, $command); @@ -361,6 +367,7 @@ class Transfer implements PromisorInterface 'before_upload' => $this->before, 'before_complete' => $this->before, 'concurrency' => $this->concurrency, + 'add_content_md5' => $this->addContentMD5 ]))->promise(); } -- cgit v1.2.3