Hello.
I’m using October CMS v3.3.17. Several content types defined via Tailor blueprints.
Now I want to use DigitalOcean Spaces bucket to store the images, sounds and other media.
This is what I’ve done so far:
Installed the required package:
sail composer require league/flysystem-aws-s3-v3 "^3.0"
Added the driver to the filesystems.php with:
'disks' => [
//......
/* DigitalOcean storage */
'do_spaces' => [
'driver' => 's3',
'key' => env('SPACES_ACCESS_KEY_ID'),
'secret' => env('SPACES_SECRET_ACCESS_KEY'),
'region' => env('SPACES_DEFAULT_REGION'),
'bucket' => env('SPACES_BUCKET'),
'endpoint' => env('SPACES_ENDPOINT'),
'visibility' => 'public', // Update: this is necessary to make your uploads read-only for anyone
],
],
The environment parameters are in the .env file:
#DigitalOcean storage parameters
SPACES_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SPACES_SECRET_ACCESS_KEY=yyyyyyyyyyyyyyyyyyyyy
SPACES_DEFAULT_REGION=nyc3
SPACES_BUCKET=mybucket
SPACES_ENDPOINT=https://mybucket.nyc3.digitaloceanspaces.com
Updated the configuration in cms.php:
'storage' => [
// ...
//Use DigitalOcean driver (as defined in filesystems.php) for media manager
'media' => [
'disk' => 'do_spaces',
'folder' => '',
'path' => env('SPACES_ENDPOINT'),
],
],
Clear caches with:
sail artisan optimize:clear
The problem: Media manager still using local storage. I see no changes.
What else is needed to make this work?
Best regards.