I have a problem with AWS s3 and October cms. If I upload images or files from media page s3 works fine, but if I upload images from Object (System or Widget) is attachment_id, and attachment_type on the system_file table is empty. So, I cant fetch all images by model.
Someone have any idea whether it is an October cms error or I still have something to configure?
filesystem.php config:
'default' => 's3',
'cloud' => 's3',
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
's3' => [
'driver' => 's3',
'key' => env('AWS3_KEY'),
'secret' => env('AWS3_SECRET'),
'region' => env('AWS3_REGION'),
'bucket' => env('AWS3_BUCKET'),
],
cms.php config:
'storage' => [
'uploads' => [
'disk' => 's3',
'folder' => 'chemie/uploaded-files',
'path' => 'https://amazon/s3/bucket-name/chemie',
],
'media' => [
'disk' => 's3',
'folder' => 'chemie',
'path' => 'https://amazon/s3/bucket-name/chemie',
],
],
sistem_file db table: image
Model example:
/**
* @var array
*/
public $attachMany = [
'gallery_images' => [
'System\Models\File',
],
];