Search code examples
angularapifile-uploadcloudinary

Cloudinary uploade image : Request has been blocked by CORS policy


I'm trying to upload an image in an angular project using the following approach

1- service:

enter image description here

2- html:

enter image description here

3- ts: enter image description here

but I'm getting the following error:

enter image description here

can anyone help me solving this error? thanks.


Solution

  • I forgot to post the answer, the problem was I forgot I'm using Interceptor that adds headers, It's not allowed by "Cloudinary", so if anyone has the same problem don't forget to make an exception in the "Cloudinary" requests and not adding headers. Thanks