F
Filamentβ€’2y ago
Gunnolfson

Enable Minio S3 in Laravel Sail environment

Hi I'm making a CRUD resource for users, and it should be possible to add an avatar. However, I'm using a Laravel Sail environment with a minio container, acting as a s3 actor. I'm struggling to make Livewire FileUpload component working with this setup πŸ˜… I got this article recommended https://talltips.novate.co.uk/livewire/livewire-file-uploads-using-s3 but it seems cors is enabled by default in minio according to https://min.io/docs/minio/linux/operations/checklists/thresholds.html#id3 this Any idea how to configure it? πŸ€”
2 Replies
LeandroFerreira
LeandroFerreiraβ€’2y ago
create the β€œlocal” bucket
FileUpload::make('avatar')
->disk('s3')
FileUpload::make('avatar')
->disk('s3')
.env
AWS_ACCESS_KEY_ID=sail
AWS_SECRET_ACCESS_KEY=password
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET="local"
AWS_ENDPOINT=http://minio:9000
AWS_URL=http://localhost:9000/local
AWS_USE_PATH_STYLE_ENDPOINT=true
AWS_ACCESS_KEY_ID=sail
AWS_SECRET_ACCESS_KEY=password
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET="local"
AWS_ENDPOINT=http://minio:9000
AWS_URL=http://localhost:9000/local
AWS_USE_PATH_STYLE_ENDPOINT=true
Gunnolfson
GunnolfsonOPβ€’2y ago
Yes, but you keep the issue there. It needs to have a http://localhost:9000 for AWS_ENDPOINT as the browser is on the host network πŸ˜…
Want results from more Discord servers?
Add your server