F
Filamentβ€’2y ago
Tur

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
cheesegrits
cheesegritsβ€’2y ago
Dud you set visibility('private') on the upload field?
Tur
TurOPβ€’2y ago
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
Dennis Koch
Dennis Kochβ€’2y ago
Is it a CORS error in the console?
Tur
TurOPβ€’2y ago
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
Dennis Koch
Dennis Kochβ€’2y ago
Yep. It is. So you need to setup CORS on S3 correctly. I guess there a 1000 threads on here with that issue πŸ˜…
Tur
TurOPβ€’2y ago
damn. Sorry for that. Works like a charm, love u and have a great day πŸ™‚
toeknee
toekneeβ€’2y ago
We need a way of detecting this in Filament it happens so much ahaha
Dennis Koch
Dennis Kochβ€’2y ago
That was fast πŸ˜…
Tur
TurOPβ€’2y ago
I think there should be a section in documentation "IF IT DOESNT WORK, CHECK CORS" πŸ˜›
Dennis Koch
Dennis Kochβ€’2y ago
You mean this one? 😜
Tur
TurOPβ€’2y ago
YES! πŸ˜„ looks like someone didnt read the documentation (me :P)
Want results from more Discord servers?
Add your server