Why October Cms Don't Save Attachments On Db By Upload Images With Amazon-s3?
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?
'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'), ],
'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
/** * @var array */ public $attachMany = [ 'gallery_images' => [ 'System\Models\File', ], ];
Actually its not possible as
widget/file uploader etc make relation to files and save that relation in database.
where as in media that is just plain path either of
remote-disk based on configuration
So, if you want to add images which are stored on
add repeater field which have media widget in it to select files and upload filesin this way you can select or add multiple files.
as from code I see there is no possible implementation for
remote-disk in database
Media uses remote disk
File-upload widget/Model uses only local disk
if you have any doubts please comment.
- → React Router + AWS Backend, how to SEO
- → How to improve SEO for Serverless Websites?
- → File Upload to aws S3 Laravel 5.1
- → Uploading to S3 with Laravel 5.2
- → Why october cms don't save attachments on db by upload images with amazon-s3?
- → File size limit for uploads into aws s3 in OctoberCMS Media Library
- → S3 putObject callback not returning expected objects
- → Amazon S3 image hosting with Shopify
- → Can't upload a file to AWS S3 using OctoberCMS
- → AWS S3 cannot delete objects in bucket via PHP SDK
- → Laravel S3 Storage disk; has() is returning false
- → Laravel s3 multiple buckets
- → AWS upload file from client to S3