I'm trying to upload an image in an angular project using the following approach
1- service:
2- html:
but I'm getting the following error:
can anyone help me solving this error? thanks.
I'm trying to upload an image in an angular project using the following approach
1- service:
2- html:
but I'm getting the following error:
can anyone help me solving this error? thanks.
MDN has some really good documentation on CORS https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
You'll basically be required to send an additional header with the request to abide by the CORS security protocol.
Here's a StackOverflow link explaining the protocol How does Access-Control-Allow-Origin header work?
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