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 McKay2y ago
Can you show the contents of your config/cors.php file?
Diego Henrique
Diego HenriqueOP2y 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
DrByte2y 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 McKay2y 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 HenriqueOP2y ago
It is my cors configuration on bucket
Ben McKay
Ben McKay2y ago
I would assume a file upload would be a "POST" request I think
Solution
Diego Henrique
I SOLVED, THE PROBLEM IS: DATETIME OF MY COMPUTER

Did you find this page helpful?