Skip to content

Instantly share code, notes, and snippets.

@dfguo
Created January 10, 2014 09:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dfguo/8348870 to your computer and use it in GitHub Desktop.
Save dfguo/8348870 to your computer and use it in GitHub Desktop.
remove cloudinary images when you are in the search image page
$.each($('.public_id'), function(i, item) {
key = $(item).attr('title');
$.ajax({
url: 'https://cloudinary.com/console/media_library/delete_resource',
type: 'DELETE',
data: "public_id=" + key + "&type=upload",
success: function(result) {
console.log(key + " deleted.");
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment