How can I delete a folder from the Media Library?

Follow

Comments

8 comments

  • Avatar
    Karl Johan Kleist

    I just tried to delete an empty folder from the media library. But this fails, I just get this following pop-up over and over again:

    "Confirm Deletion

    Are you sure you want to delete this folder?"

    1
    Comment actions Permalink
  • Avatar
    Nadav Ofir

    Hi,

    Can't see an empty folder on your account.
    Did you succeed deleting it?

    If you're still encountering an issue, please share some more information regarding the exact folder so we can check it out on your account,

    If you care about privacy, please feel free opening a support ticket:
    http://support.cloudinary.com/tickets/new

    0
    Comment actions Permalink
  • Avatar
    Karl Johan Kleist

    Thanks for for your assistance.

    I finally managed to delete the folder, some hour later.

    The folder had been renamed earlier on (implicitly, by renaming an image). May a cache somewhere that does not properly invalidate?

    0
    Comment actions Permalink
  • Avatar
    Finalsite Development

    I'm having a problem with this. The folders(s) that I'm trying to delete via the trash can icon in the admin are empty but it appears that the AJAX is making a call to an incorrect URL:


    DELETE https://cloudinary.com/console/media_library/subfolders 404 (Not Found)


    I suspect that the lookup for the specified folder is failing and returning this 404 error because hitting the above URL successfully redirects to https://cloudinary.com/console/media_library


    I inspected the path being sent in the form data of the AJAX request and it appears to be correct but it's a relative path instead of an absolute path. I'm not sure if that would make any difference on the backend.

    0
    Comment actions Permalink
  • Avatar
    Nadav Ofir

    Seems like you're trying to delete a folder that contains backups of previously deleted resources. If you wish to clear your backup, please contact us via support@cloudinary.com
    We'll look into improving the messaging in such error cases.

    0
    Comment actions Permalink
  • Avatar
    Vanitha

    Unable to delete my empty folder. Please help me to fix this. Thanks,

    0
    Comment actions Permalink
  • Avatar
    Roee Ben Ari

    Hi Vanitha, if the folder contains backup entries for deleted resources then it cannot be deleted. In order to fully delete the folder, these backup entries need to be deleted as well. Please open a support ticket with all the relevant information (your cloud name and folders name) and we'll be glad to help with that. 

    0
    Comment actions Permalink
  • Avatar
    Hans

    We run a regularly scheduled housekeeping job to delete any resources from our Cloudinary library that are no longer in use in our application but were for one reason or another not deleted at the appropriate time.

    For this we essentially retrieve the full list of resources by prefix, compare their publicIds against those in our application database and then use the bulk deletion API call. We also make heavy use of folders in our library, and in many cases when we delete a resource,we are left with an empty folder or tree of folders.

    I know there is an admin API method to explicitly delete empty folders, but to do so requires yet more IMO unnecessary API queries. Instead, it would be great to have the option, as an optional parameter in the delete resources API call, to automatically delete any empty folders left behind after deleting resources.

    I'd actually submit this as a feature request/suggestion, but the "Submit Feature" link in this Support area doesn't seem to work, and only takes you to the Roadmap screen.

    0
    Comment actions Permalink

Please sign in to leave a comment.