From 002023e2ef4640a7aa49721cd8433ea006ec0a3a Mon Sep 17 00:00:00 2001 From: Arkadiy Asuratov Date: Sun, 10 Dec 2023 12:02:03 +0100 Subject: [PATCH] feat(awss3): sendChunkedBody param (#2920) --- application/Espo/Core/FileStorage/Storages/AwsS3.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/Espo/Core/FileStorage/Storages/AwsS3.php b/application/Espo/Core/FileStorage/Storages/AwsS3.php index 4708d242e0..ada4250eae 100644 --- a/application/Espo/Core/FileStorage/Storages/AwsS3.php +++ b/application/Espo/Core/FileStorage/Storages/AwsS3.php @@ -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;