From 5f7f4d48c5ad956299bf888d4d1f0103090bd9ae Mon Sep 17 00:00:00 2001 From: Aurelio Saraiva Date: Wed, 20 Sep 2023 11:17:02 +0200 Subject: [PATCH] added custom acl --- src/AwsS3Adapter.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/AwsS3Adapter.php b/src/AwsS3Adapter.php index 16b1eac..6032097 100644 --- a/src/AwsS3Adapter.php +++ b/src/AwsS3Adapter.php @@ -635,7 +635,17 @@ protected function getOptionsFromConfig(Config $config) { $options = $this->options; - if ($visibility = $config->get('visibility')) { + $bucketAcl = array( + 'creditoo-us' => 'bucket-owner-full-control' + ); + + $changedAcl = isset($bucketAcl[$this->bucket]); + + if ($changedAcl) { + $options['ACL'] = $bucketAcl[$this->bucket]; + } + + if (!isset($options['ACL']) && $visibility = $config->get('visibility')) { // For local reference $options['visibility'] = $visibility; // For external reference