Использую в проекте хранилище, совместимое с API Amazon S3
В конфигах следующие настройки:
.env
FILESYSTEM_DEFAULT=s3
FILESYSTEM_PATH=https://cdn.mydomain.com/my-project
FILESYSTEM_S3_KEY=********************
FILESYSTEM_S3_SECRET=*******************************************
FILESYSTEM_S3_URL=https://cdn.mydomain.com/my-project
FILESYSTEM_S3_REGION=sfo1
FILESYSTEM_S3_BUCKET=my-bucket
cms.php
'storage' => [
'uploads' => [
'disk' => env('FILESYSTEM_DEFAULT', 'local'),
'folder' => env('FILESYSTEM_FOLDER', '') . 'uploads',
'path' => env('FILESYSTEM_PATH', '/storage/app') . '/uploads',
'temporaryUrlTTL' => 3600,
],
'media' => [
'disk' => env('FILESYSTEM_DEFAULT', 'local'),
'folder' => env('FILESYSTEM_FOLDER', '') . 'media',
'path' => env('FILESYSTEM_PATH', '/storage/app') . '/media',
],
'resized' => [
'disk' => env('FILESYSTEM_DEFAULT', 'local'),
'folder' => env('FILESYSTEM_FOLDER', '') . 'resized',
'path' => env('FILESYSTEM_PATH', '/storage/app') . '/resized',
],
],
filesystems.php
'disks' => [
'local' => => [...],
's3' => [
'driver' => 's3',
'key' => env('FILESYSTEM_S3_KEY', 'your-key'),
'secret' => env('FILESYSTEM_S3_SECRET', 'your-secret'),
'endpoint' => env('FILESYSTEM_S3_ENDPOINT', 'your-endpoint'),
'region' => env('FILESYSTEM_S3_REGION', 'your-region'),
'bucket' => env('FILESYSTEM_S3_BUCKET', 'your-bucket'),
'url' => env('FILESYSTEM_S3_URL', '/storage/app/'),
'visibility' => 'public',
],
'rackspace' => [...],
],
Получаю ошибки вида:
Error executing "ListObjects" on "https://my-bucket.s3.sfo1.amazonaws.com/?prefix=media%2F&delimiter=%2F&encoding-type=url";
Библиотека league/flysystem-aws-s3-v3
подменяет мой url, на s3.amazonaws.com
Есть какие-нибудь идеи, кто сталкивался с такой реализацией?