cloudinary-community / cloudinary-laravel

Laravel SDK for Cloudinary
MIT License
258 stars 70 forks source link

@hotfuzz123 I think the only way you can do this right now is if you are storing the public_id(which could be the filename) of the uploaded file in your database. Then you can use that to delete the resource from Cloudinary by supplying the `public_id` to the ```destroy()``` method of the Cloudinary API. #41

Closed dela-dels closed 2 years ago

dela-dels commented 2 years ago

@hotfuzz123 I think the only way you can do this right now is if you are storing the public_id(which could be the filename) of the uploaded file in your database. Then you can use that to delete the resource from Cloudinary by supplying the public_id to the destroy() method of the Cloudinary API.

So the flow could be something like this (using the example of a user updating their profile picture):

Something along these lines should probably work.

Originally posted by @dela-dels in https://github.com/cloudinary-labs/cloudinary-laravel/issues/40#issuecomment-863337811