How to delete image? Merci
qamalyanaren opened this issue · 2 comments
qamalyanaren commented
How to delete image? Merci
yakirp commented
Hi @Fkut,
Deleting images can be done by Admin API.
First, initialize the Api
object:
import com.cloudinary.*;
import com.cloudinary.utils.*;
Map config = ObjectUtils.asMap(
"cloud_name", "my_cloud_name",
"api_key", "my_api_key",
"api_secret", "my_api_secret");
Cloudinary cloudinary = new Cloudinary(config);
Api api = cloudinary.api();
And then call deleteResources
api.deleteResources(Arrays.asList("public_id1", "public_id2"),
ObjectUtils.emptyMap());
You can read more about it here.
qamalyanaren commented
Tankx, it works well