Skip to content

Commit

Permalink
Support of s3 storage class in External Storage application
Browse files Browse the repository at this point in the history
Signed-off-by: François Ménabé <[email protected]>
  • Loading branch information
fmenabe committed Jan 11, 2023
1 parent 5e48379 commit e76a7d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/files_external/lib/Lib/Backend/AmazonS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public function __construct(IL10N $l, AccessKey $legacyAuth) {
->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')))
Expand Down
3 changes: 2 additions & 1 deletion apps/files_external/lib/Lib/Storage/AmazonS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,8 @@ public function copy($source, $target, $isFile = null) {
$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) {
Expand Down

0 comments on commit e76a7d5

Please sign in to comment.