2
votes

I am new to cloudinary and I need to delete the image uploaded by client side web app(angularjs), but cloudinary doesn't allow delete token to return as a part of response body because of unsigned upload is there any way I can delete the image without delete token? I am not having server in between client side and cloudinary. Currently uploading the image in this code:

Upload.upload({
   method: "POST",
    skipAuthorization: true,

    url: "https://api.cloudinary.com/v1_1/" + cloudinary.config().cloud_name + "/upload",
        data: {
           upload_preset: cloudinary.config().upload_preset,
           tags: '',
           file: file,
           context: 'photo=' + title,
         }
1

1 Answers

1
votes

In the upload-preset edit page (on your account upload settings page), click on the "Advanced Options" button and set "Return delete token" to "YES".
This will tell Cloudinary to include return the delete-token within the response JSON, which then can be utilized to remove the uploaded image in an unsigned manner (notice the token is only valid for 10 minutes).
More information here: https://support.cloudinary.com/hc/en-us/articles/202521132-How-to-delete-an-image-from-the-client-side-