PHP code example of spacecatninja / imager-x-aws-storage-driver

1. Go to this page and download the library: Download spacecatninja/imager-x-aws-storage-driver library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

spacecatninja / imager-x-aws-storage-driver example snippets


'storages' => ['aws'],

'storageConfig' => [
    'aws' => [
        'accessKey' => '',
        'secretAccessKey' => '',
        'region' => 'eu-west-1',
        'bucket' => 'my-bucket',
        'folder' => 'transforms',
        'storageType' => 'standard',
        'requestHeaders' => [],
        'disableACL' => false,
        'public' => true,
        'cloudfrontInvalidateEnabled' => false,
        'cloudfrontDistributionId' => '',
    ],
],

'imagerUrl' => 'https://my-bucket.s3.eu-west-1.amazonaws.com/transforms/',

'aws' => [
    'useCredentialLessAuth' => true,
    'region' => 'eu-west-1',
    'bucket' => 'my-bucket',
    'folder' => 'transforms',
],