feat(awss3): sendChunkedBody param (#2920)

This commit is contained in:
Arkadiy Asuratov
2023-12-10 12:02:03 +01:00
committed by GitHub
parent 8776acb4b5
commit 002023e2ef
@@ -57,6 +57,7 @@ class AwsS3 implements Storage
$credentials = $config->get('awsS3Storage.credentials') ?? null;
$endpoint = $config->get('awsS3Storage.endpoint') ?? null;
$pathStyleEndpoint = $config->get('awsS3Storage.pathStyleEndpoint') ?? false;
$sendChunkedBody = $config->get('awsS3Storage.sendChunkedBody') ?? null;
if (!$bucketName) {
throw new RuntimeException("AWS S3 bucket name is not specified in config.");
@@ -74,6 +75,10 @@ class AwsS3 implements Storage
$clientOptions['pathStyleEndpoint'] = (bool) $pathStyleEndpoint;
}
if ($sendChunkedBody !== null) {
$clientOptions['sendChunkedBody'] = (bool) $sendChunkedBody;
}
if ($credentials && is_array($credentials)) {
$clientOptions['accessKeyId'] = $credentials['key'] ?? null;
$clientOptions['accessKeySecret'] = $credentials['secret'] ?? null;