Skip to main content

File upload using curl



  • Aditi Madan


    Structure of the curl image upload: curl<cloud_name>/image/upload -X POST --data 'file=<url of image>&timestamp= <current unix timestamp>&public_id=<insert public_id>&transformation=<insert transformation>&api_key=<your api key>&signature=<generated signature>'   

    If we want to upload sample image with transformation w_200,h_200,c_limit and public id=sample then the signature will be comprised of

    1. public id 

    2. timestamp(epoch timestamp)

    3. transformation and 

    4. generated API secret/signature(Note that this is not your account API secret key but a generated signature)   

    You can use for generating the signature for testing purpose

    In this case the signature parameters will be - public_id=sample&timestamp=1514500082&transformation=w_200,h_200,c_limit<Insert your API secret here without comma or space> 

    The signature we got from running the above query on SHA-1 generator is-e5f898986395cf2ba6847571188a25b91d5e89a5

    Now our example curl command is: -

    curl<your cloud name>/image/upload -X POST --data 'file= 1514500082&public_id=sample&transformation=w_200,h_200,c_limit&api_key=<your api key>&signature=e5f898986395cf2ba6847571188a25b91d5e89a5'

    For more information on signatures:

  • vlhomme

    Hello ! Where can I find documentation about how to use the api with curl ?

  • Sam Brace

    Thanks for your question! You should find this document here:

    Yours Truly,


Post is closed for comments.