How I can upload image in to cloudinary images using react?

Options
Khubaib_Shoukat
Khubaib_Shoukat Member Posts: 1

I'm building a project for practice purposes and I want to host my media assets on this platform. I created an Image preset, everything is working fine. I just want to upload it with mern stack and Axios but I'm not able to find the API URL to upload the media. Please help to get this resolve

Answers

  • tia
    tia Member, Cloudinary Staff Posts: 25
    Options

    Hi there,

    Thanks so much for reaching out.

    With the recent update, we no longer show the API base URL on the dashboard.

    By default, the API endpoints use the following format:

    https://api.cloudinary.com/v1_1/:cloud_name/:action
    

    For example, to upload an image asset to the 'demo' account:

    POST https://api.cloudinary.com/v1_1/demo/image/upload
    

    Your Cloudinary Cloud name and API Key (which can be found on the Dashboard page of your Cloudinary console) are used for the authentication. All the methods in this API also require a signature, for which you need your API Secret, to authenticate the request on the Cloudinary servers.

    You can upload an image on your own Cloudinary account by replacing the CLOUD_NAME, FILE, TIMESTAMP, API_KEY, and SIGNATURE in the cURL command below:

    curl https://api.cloudinary.com/v1_1/<CLOUD_NAME>/image/upload -X POST --data 'file=<FILE>&timestamp=<TIMESTAMP>&api_key=<API_KEY>&signature=<SIGNATURE>'
    

    I hope this helps. If you have any questions, do not hesitate to ask.

    Kind Regards,

    Tia