I did multiple image upload direct from browser using jquery file upload + cloudinary and I need to build direct delete of uploaded image also. I upload image using this file tag
<input name="file" type="file"
class="cloudinary-fileupload"
data-cloudinary-field="image_id[]"
data-form-data=" ... html-escaped JSON data ... "
multiple="multiple >
</input>
after uploading, it creates hidden field like this
<input type="hidden" name="images_id[]"
value="image/upload/v1404930923/image_name">
What I want to do is to make additional attribute on this hidden field every time I upload an image, for example "data-id". I need to delete proper hidden field when I delete file from Cloudinary direct from the browser.
Since the hidden field has a value, like:
resource_type/type/path#signature
, where each is available on the result object of thecloudinarydone
handler, you can reconstruct this and traverse the hidden fields and find a matching value, and then add the attribute that you want.