Spatie Medialibrary private files on s3
Hello i have a problem with integrating Spatie Medialibrary with filament. I wanted to use the private files. First a file is uploaded to livewire-tmp foler locally but when i want to upload it to s3. I mean i managed to upload it but i cant display it since it shows me a bunch of errors: Status code 403, access control checks. Is there someting im missing to make it work ?
11 Replies
Dud you set visibility('private') on the upload field?
Hello thank you for your response. Yes I have the "visibility" set to "private" and I can see that the file is uploaded to s3 and media is being created but when visiting the edit page it doesn't display the file
Is it a CORS error in the console?
its "[Error] Origin http://127.0.0.1:8002 is not allowed by Access-Control-Allow-Origin. Status code: 200" and "Fetch API cannot load due to access control check"
so i believe yes
Yep. It is. So you need to setup CORS on S3 correctly. I guess there a 1000 threads on here with that issue π
damn. Sorry for that. Works like a charm, love u and have a great day π
We need a way of detecting this in Filament it happens so much ahaha
That was fast π
I think there should be a section in documentation "IF IT DOESNT WORK, CHECK CORS" π
You mean this one? π
YES! π looks like someone didnt read the documentation (me :P)