Search code examples
javascriptnode.jscloudinary

what is the alternative of cloudinary.v2.api.delete_folder? How can I delete empty folder now as this method is deprecated?


few monts ago I deleted my empty cludinary folders using this: cloudinary.v2.api.delete_folder

but it is not working now, what is the best alternative of this?


Solution

  • The delete folder method of the Admin API is not deprecated.

    The most likely reason it's not working for you is that the folder you are trying to delete is not actually empty. It's important to note that if you have backups enabled and have deleted files from within that folder, then these backup copies will result in the folder not being considered empty. In such cases, you would need to delete the folder from within the Media Library directly.