Skip to main content

has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Comments

3 comments

  • Loic Verger Del Bove

    Hi Isabela,

    I can see some errors in your code. 

    First, the URL you are passing in your Axios call should be:

    https://api.cloudinary.com/v1_1/dgzdhce14/image/upload

    And the method should be a POST as explained here. Also, generally, apart from the "Content-Type", you don't need to pass any other/custom headers for the uploads to go through so can you remove the "Access-Control-Allow-Origin" header you set?

    Hope that helps.

    Best,

    Loic

    0
  • isabela

    the url and header problems are solved...

    can I change to PUT?

    because it is an update profile...

    0
  • Eric Pasos

    Hi Isabela,

    The implementation for uploading an asset with a direct call to the REST API (i.e. client-side implementation) requires to use of the POST method. For more information on other Upload API methods (i.e. server-side implementations), you may refer to the following link: https://cloudinary.com/documentation/image_upload_api_reference.

    Hope this helps.

    0

Post is closed for comments.