Support of s3 storage class in External Storage application

Signed-off-by: François Ménabé <francois.menabe@gmail.com>
pull/36075/head
François Ménabé 3 years ago committed by François Ménabé
parent cf9bdc0274
commit 710f3fd405
  1. 2
      apps/files_external/lib/Lib/Backend/AmazonS3.php
  2. 3
      apps/files_external/lib/Lib/Storage/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')))

@ -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) {

Loading…
Cancel
Save