I have all images uploaded to my Cloudinary.
I have List of all images in my database that are uploaded to Cloudinary.
Somehow few images are deleted from Cloudinary. How can i check that this image is exist or not on Cloudinary?
I have tried to use cloudinary.api.resource
but it doen't help to find that image exist or not from here http://cloudinary.com/documentation/admin_api#details_of_a_single_resource
Can anyone have idea about this?
Asked
Active
Viewed 938 times
0

Hitesh S
- 460
- 1
- 5
- 20
1 Answers
0
There are several ways of accomplishing it -
- Use the explicit method. It checks whether the resources are already found on your account, and if so, applies the relevant transformation. If it does not find the resource, it returns an exception. You can use this behaviour to check if the resource you are uploading was already uploaded.
- Use HEAD requests - Its possible to use HTTP HEAD requests and check the returned response. If the resource was already uploaded, then the response that would be returned is 200. If the resource is not found, the response would be 404. This would not count as a request, and would not count as part of the usage.

Maor.G
- 440
- 2
- 5