Destroying image doesn't delete them completely
Hi Cloudinary, I'm using your API for images on my website.
I use
\Cloudinary\Uploader::destroy($request->image);
to delete images but it seams it doesn't work as expected.
After delete imae is still there with bytes = 0
For example:
0 => array:14 [▼ "asset_id" => "ae44786f1e2cad91883c66442571fe2a" "public_id" => "home-page/ Sapele Gate.jpg" "format" => "jpg" "version" => 1499654486 "resource_type" => "image" "type" => "upload" "placeholder" => true "created_at" => "2017-07-10T02:41:26Z" "bytes" => 0 "width" => 800 "height" => 600 "backup" => true "url" => "http://res.cloudinary.com/jbn/image/upload/v1499654486/home-page/%20%20%20Sapele%20Gate.jpg.jpg" "secure_url" => "https://res.cloudinary.com/jbn/image/upload/v1499654486/home-page/%20%20%20Sapele%20Gate.jpg.jpg"
How can I solve this?
0
-
Hi,
Looking at the response you shared, I see that you have backups enabled and when an asset is deleted, the backup copy exists to allow for restoration. The response you are seeing is that of the latest backup version which you can use the Admin API restore resources method to restore if needed.
If you are listing resources in your account and don't want to see resources which have been deleted but have backup copies, then you can filter them out by checking the 'bytes' (which will be set to 0) and 'placeholder' (which will be set to True).
1 -
Thanks, i already filter them by 'bytes' and disable my "backup".
Thanks again
0
Post is closed for comments.
Comments
2 comments