MediaLibrary not working with minIO with docker
Hi there,
i've installed minIO in a docker container
and i'm using Spatie Media Library plugin for uploading my images to minIO
when the filesystem disk set to public or local it has not any problem and everything works fine!
but when i choose minio for disk, only the temp-livewire files are uploading successfully to minIO but the original files not uploading and does not save any database record for media table.
here is my code :
and here is my .env settings:
is there any bug or have I made a mistake somewhere?
11 Replies
try this
Thanks, i tried this but does not worked even for temp file !!
it seems that access key and secret access key is deprecated in minIO new version.
hum, not sure
i saw that in
I was using it with laravel sail and it was working.
I'm using Mac now. I installed minio and it is working as well
i'm using laravel with my own docker configurations. i'm going to inspect sail configurations to know about minio configs.
this is a little bit weird.
i'm using WSL2 on Windows.
maybe you can try it using sail
Create a bucket called
local
and try this
i used my own env variable and now i'm sure that my project is connected to minio, because i tested it using tinker and Storage facade and it worked, but i found that the uploaded file field, before saving data is set to an empty array
and returned something like this :
as you can see
images
is empty!
i tested this using default fileUpload component .
i'm still have the problem, i think there is a bug in FileUpload component, and seems that TemporaryFileUploader class does not compatible with minioIt's working. This is my snippet of code.
Ressource:
Config/FileSystem
and the .env file:
I'm having the same problem. I even tried changing the access policy to
public
on the bucket and nothing, dead. There is no error, there is nothing
So after hours and hours trying to find a solution a finally stumbled on something and I thinks is a good solution.
For anyone using minio with docker I changed AWS_ENDPOINT
to http://host.docker.internal:9000
and them it started working flawless
I forgot where I read the solution. So I apologize to the author of this solutionI copied this repo and it's working like a charm! https://github.com/nicolus/laravel-minio-example