Created
January 10, 2014 09:06
-
-
Save dfguo/8348870 to your computer and use it in GitHub Desktop.
remove cloudinary images when you are in the search image page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.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