Delete all images in folder with cURL?
I see that we can delete all images using the DELETE endpoint.
If I had a folder named development, would I use the following endpoint to delete all images in that folder:
DELETE /resources/image/upload?path=/development
I'd test it, but we have a production environment on the same account & wouldn't want it to fail & delete everything.
-
Hi,
You can use delete by prefix: https://cloudinary.com/documentation/admin_api#delete_all_or_selected_resources to delete the resources beginning with the folder name.
For eg: curl -X DELETE 'https://<api key>:<api secret>@api.cloudinary.com/v1_1/<cloud name>/resources/image/upload?prefix=<folder name>'
Thanks,
Aditi
Please sign in to leave a comment.
Comments
1 comment