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.



  • 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:

    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.



  • isabela

    the url and header problems are solved...

    can I change to PUT?

    because it is an update profile...

  • 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:

    Hope this helps.


Post is closed for comments.