Rename image before uploading using jQuery

Comments

4 comments

  • Avatar
    Raya Straus

    Hi Abhishek,

    Thank you for contacting us.

    You can change the public_id before uploading the file by this function:
    $('.cloudinary_fileupload').unsigned_cloudinary_upload(<upload\_preset>, {public_id: "my_image"});

     

    If you require any further information, feel free to contact me.

    0
    Comment actions Permalink
  • Avatar
    Abhishek Raut

    hey thanks @Raya that worked for me.

    0
    Comment actions Permalink
  • Avatar
    Abhishek Raut

    Hey Raya one more thing here; How can I get the actual image name while uploading so that I can do some kind of manipulation before uploading.

    0
    Comment actions Permalink
  • Avatar
    Raya Straus

    Hi Abhishek,

    You can access the image by referring to the public_id, for example, the image from above would be referred to as "my_image".

    You can read on the following link on how to apply image transformations - http://cloudinary.com/documentation/image_transformations

     

    Hope this helps, please let me know if you need anything else.

    Raya 

     

    0
    Comment actions Permalink

Please sign in to leave a comment.