This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

alexwenzel
alexwenzel

After migration to october cms 2, I struggled a bit to set up amazon s3 storage. Here is a reminder for myself and others.

config/filesystems.php

<?php

return [

    'default' => 's3',

    'cloud' => 's3',

    'disks' => [

        'local' => [
            'driver' => 'local',
            'root'   => storage_path('app'),
            'url'    => '/storage/app',
        ],

        's3' => [
            'driver' => 's3',
            'key'    => env('AWS_ACCESS_KEY_ID'),
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
            'region' => env('AWS_DEFAULT_REGION'),
            'bucket' => env('AWS_BUCKET'),
        ],
    ],
];

And then config/system.php

    'storage' => [

        'uploads' => [
            'disk'   => 's3',
            'folder' => 'uploads',
            'path'   => 'https://s3.eu-central-1.amazonaws.com/******/uploads',
        ],

        'media' => [
            'disk'   => 's3',
            'folder' => 'media',
            'path'   => 'https://s3.eu-central-1.amazonaws.com/******/media/',
        ],

        'resources' => [
            'disk'   => 'local',
            'folder' => 'resources',
            'path'   => '/storage/app/resources',
        ],

    ],

If your getThumbs urls are pointing to your local storage, you forgot to setup the storage uploads and media property in config/system.php.

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.