You are here

public function StreamWrapper::getOptions in AmazonS3 7.2

Override getOptions() to default all files to be publicly readable.

Return value

array

1 call to StreamWrapper::getOptions()
StreamWrapper::rename in src/StreamWrapper.php
Override rename() to handle setting the URI on move.

File

src/StreamWrapper.php, line 358
Drupal stream wrapper implementation for Amazon S3

Class

StreamWrapper
@file Drupal stream wrapper implementation for Amazon S3

Namespace

Drupal\amazons3

Code

public function getOptions() {
  if (!isset($this->uri)) {
    throw new \LogicException('A URI must be set before calling getOptions().');
  }
  $options = parent::getOptions();
  $options['ACL'] = 'public-read';
  if ($this
    ->useRrs()) {
    $options['StorageClass'] = 'REDUCED_REDUNDANCY';
  }
  return $options;
}