FileUpload with Laravel Sail && Minio
I understand there was some sort of difficulties with livewire and minio when it comes to temporary signed urls. I've configured livewire to use the "local" disk for temporary file uploads, however when I try to submit the form, nothing happens. The file upload field resets and is blank.
Earlier, I tried setting the temp file upload to "s3" and the livewire-tmp folder with the image was actually uploaded to my minio instance, however when I tried to submit the form, it acted as it the file wasn't the right type and triggered a validation error that it shouldn't have.
Any idea how I can get file uploads to work with minio?
11 Replies
please send the code you tried for the file upload
i have used minio without issues before
@danharrin
sounds like a validation... could you try without ->image() please?
did you try a .jpg?
Hey, yeah I did. Same issue. No validation seems to work. It's almost as if it can't retrieve the file from the temp server on minio even though it is uploaded there successfully in the livewire-tmp folder, however I would assume if it couldn't find the file it would trigger the "required" validation rule instead; so not sure.
is the bucket public?
did you config the .env?
something like this?
Yes the bucket is public.
should work... can you share the project on github?
Send me a DM please...
try
AWS_ENDPOINT=http://minio:9000
@Leandro Ferreira Wow. That actually worked. Insane.
Any idea why that worked? @Leandro Ferreira
nice!
not sure, but inside the docker we should use minio:9000
Thanks a lot! Cookies and ice cream for you.
I have issue when i submit form , it not working save attachments on database , plz help me ?
Code exam :
FileUpload::make('attachments')
->disk('s3')
->directory('form-attachments')
->preserveFilenames()
->openable()
->reorderable()
->appendFiles(),