How to fix CORS issue with Cloudflare R2 and Laravel Filament / Livewire
Laravel Filament's Media Library plugin use Livewire's upload file javascript to send your file to your cloud disk.
When using Cloudflare R2, you will probably get a CORS error and the upload will get canceled.
In your R2 bucket settings, make sure you update the CORS settings like this :
[
{
"AllowedOrigins": [
"https://yourdomain.com"
],
"AllowedMethods": [
"GET",
"POST",
"PUT"
],
"AllowedHeaders": [
"*"
]
}
]
Save and retry :)
I consider myself as an IT Business Artisan. Or Consultant CTO. I'm a self-taught Web Developper, coach and teacher. My main work is helping and guiding digital startups.
more about meBTC
bc1qgw9a8hyqqwvcls9ln7vhql4mad0qkveutr2td7
ETH
0x3A720717Da03dB6f3c4a4Ff08BC64100205A79d0
2025 © My Dynamic Production SRL All rights Reserved.