diff options
author | François Ménabé <francois.menabe@gmail.com> | 2023-01-05 16:11:56 +0100 |
---|---|---|
committer | François Ménabé <francois.menabe@unistra.fr> | 2023-01-12 14:59:13 +0100 |
commit | 710f3fd4053c233f7a63bb10528ad75e83724e52 (patch) | |
tree | ef23abc87f379d7144ea55aa196302d298802990 /apps/files_external | |
parent | cf9bdc02749b1627f6cf556959952bafebb9f503 (diff) | |
download | nextcloud-server-710f3fd4053c233f7a63bb10528ad75e83724e52.tar.gz nextcloud-server-710f3fd4053c233f7a63bb10528ad75e83724e52.zip |
Support of s3 storage class in External Storage application
Signed-off-by: François Ménabé <francois.menabe@gmail.com>
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/lib/Lib/Backend/AmazonS3.php | 2 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/AmazonS3.php | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_external/lib/Lib/Backend/AmazonS3.php b/apps/files_external/lib/Lib/Backend/AmazonS3.php index 26da263f094..831064b632d 100644 --- a/apps/files_external/lib/Lib/Backend/AmazonS3.php +++ b/apps/files_external/lib/Lib/Backend/AmazonS3.php @@ -47,6 +47,8 @@ class AmazonS3 extends Backend { ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('region', $l->t('Region'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), + (new DefinitionParameter('storageClass', $l->t('Storage Class'))) + ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('use_ssl', $l->t('Enable SSL'))) ->setType(DefinitionParameter::VALUE_BOOLEAN), (new DefinitionParameter('use_path_style', $l->t('Enable Path Style'))) diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index ffa25dba999..6845d1f69c2 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -583,7 +583,8 @@ class AmazonS3 extends \OC\Files\Storage\Common { $this->getConnection()->copyObject([ 'Bucket' => $this->bucket, 'Key' => $this->cleanKey($target), - 'CopySource' => S3Client::encodeKey($this->bucket . '/' . $source) + 'CopySource' => S3Client::encodeKey($this->bucket . '/' . $source), + 'StorageClass' => $this->storageClass, ]); $this->testTimeout(); } catch (S3Exception $e) { |