API Deletion Of Folder

Comments

5 comments

  • Avatar
    Yakir Perlin

    Hi Dessie,

    We have an API method for deleting folders, but it is not currently documented or supported in our SDKs. It is on our roadmap to support this, but there is currently no ETA.

    However, you can accomplish this by calling the API directly, for example:

    curl -X DELETE -u <API_KEY>:<API_SECRET> "https://api.cloudinary.com/v1_1/<cloud_name>/folders/<folder>"

     

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Dessie Clarke

    Hi Yakir,

     

    Thanks for the very quick response.  I'll use that method in the meantime as it seems to work fine.

    0
    Comment actions Permalink
  • Avatar
    Alumni QA

    That doesn't seem to work fine.

    For empty folders that were containing already deleted files (so only available as backup). This method returns a 'folder is not empty' message while it is logically empty.

    Files have been deleted by the API (not by the console).

    @Yakir, any workaround on this?

    1
    Comment actions Permalink
  • Avatar
    Johny

    I have same issue any solution?

    0
    Comment actions Permalink
  • Avatar
    Stephen Doyle

    Hi Johny,

    You can delete empty folders using the API method Yakir mentioned, which is supported now in many of our SDKs or can be called directly via an HTTP request.
    For non-empty folders you need to delete the files inside first, and if a folder is empty except for backup copies of deleted files, it can be deleted in our Media Library UI

    Regards,

    Stephen

    0
    Comment actions Permalink

Please sign in to leave a comment.