I'm trying to upload an image to imgur with js (browser) and get a CORS error:
Access to XMLHttpRequest at 'https://api.imgur.com/3/upload' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
But preflight request contains Access-Control-Allow-Origin
header:
The request itself:
What I'm missing? this is because access-control-allow-credentials
set to true
?
The problem was with their API Docs :\
The URL is: https://api.imgur.com/3/image
and not https://api.imgur.com/3/upload
as said here: https://apidocs.imgur.com/#c85c9dfc-7487-4de2-9ecd-66f727cf3139
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With