Digital ocean spaces cors errors

i am trying upload image with
FileUpload
FileUpload
field, but i receive this:
No description
Solution:
I SOLVED, THE PROBLEM IS: DATETIME OF MY COMPUTER
Jump to solution
8 Replies
Ben McKay
Ben McKay12mo ago
Can you show the contents of your config/cors.php file?
Diego Henrique
Diego HenriqueOP12mo ago
'paths' => ['*'],

'allowed_methods' => ['*'],

'allowed_origins' => ['*'],

'allowed_origins_patterns' => [],

'allowed_headers' => ['*'],

'exposed_headers' => ['*'],

'max_age' => 0,

'supports_credentials' => false,
'paths' => ['*'],

'allowed_methods' => ['*'],

'allowed_origins' => ['*'],

'allowed_origins_patterns' => [],

'allowed_headers' => ['*'],

'exposed_headers' => ['*'],

'max_age' => 0,

'supports_credentials' => false,
I am using filament 2 yet
DrByte
DrByte12mo ago
Usually when CORS is an issue with assets like this it's because that remote server doesn't have a CORS rule set up for what you're trying to do. You can't fix that in your application code. You have to fix it in CORS policy settings on your CDN side.
Ben McKay
Ben McKay12mo ago
Good catch, I was thinking backwards....this error shows that you need to add "localhost" from the digital ocean side as DrByte mentioned https://docs.digitalocean.com/products/spaces/how-to/configure-cors/
Diego Henrique
Diego HenriqueOP12mo ago
It is my cors configuration on bucket
Ben McKay
Ben McKay12mo ago
I would assume a file upload would be a "POST" request I think
Solution
Diego Henrique
Diego Henrique12mo ago
I SOLVED, THE PROBLEM IS: DATETIME OF MY COMPUTER
Want results from more Discord servers?
Add your server