wieni/flysystem_s3

There is no license information available for the latest version (2.0.2) of this package.

Installs: 2 582

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Type:drupal-module

2.0.2 2024-03-16 12:13 UTC

This package is auto-updated.

Last update: 2024-10-16 13:34:33 UTC


README

For setup instructions see the Flysystem README.md.

CONFIGURATION

The region needs to be set to the region id, not the region name. Here is a list of the region names and their corresponding ids:

The s3-cors-example.json file has a template you can use to configure CORS using the REST API or the aws s3api put-bucket-cors command.

Example configuration:

$schemes = [
  's3' => [
    'driver' => 's3',
    'config' => [
      'key'    => '[your key]',      // 'key' and 'secret' do not need to be
      'secret' => '[your secret]',   // provided if using IAM roles.
      'region' => '[aws-region-id]',
      'bucket' => '[bucket-name]',

      // Optional configuration settings.

      // 'options' => [
      //   'ACL' => 'public-read',
      //   'StorageClass' => 'REDUCED_REDUNDANCY',
      // ],

      // 'protocol' => 'https',                   // Autodetected based on the
                                                  // current request if not
                                                  // provided.

      // 'prefix' => 'an/optional/prefix',        // Directory prefix for all
                                                  // uploaded/viewed files.

      // 'cname' => 'static.example.com',         // A CNAME that resolves to
                                                  // your bucket. Used for URL
                                                  // generation.

      // 'cname_is_bucket' => TRUE,               // Set to FALSE if the CNAME
                                                  // does not resolve to a
                                                  // bucket and the bucuket
                                                  // should be included in the
                                                  // path.

      // 'endpoint' => 'https://api.example.com', // An alternative API endpoint
                                                  // for 3rd party S3 providers.

      // 'public' => TRUE,                        // Set to TRUE to link to files
                                                  // using direct links.

      // 'cors' => TRUE,                          // Set to TRUE if CORS upload
                                                  // support is enabled for the
                                                  // bucket.
    ],

    'cache' => TRUE, // Creates a metadata cache to speed up lookups.
  ],
];

$settings['flysystem'] = $schemes;