I'm unable to delete a file via the media explorer on the Cloudinary website

username123123
username123123 Member Posts: 3 ✭
edited October 8 in Digital Asset Management

I have a couple of uploaded files. I want to delete them and I was able to do so for all but one file. When I select the last one and press delete, I get a message saying "2 files deleted successfully" even though I only selected one file. And that file is still present in the media explorer even if I refresh the page.

The file has a , in it's name, maybe that's breaking the delete functionality?

This is roughly what the public_id looks like (I've replaced sensitive parts of it with xxx):

prod/portfolio_xxx/uprn_xxx/mtip_code_xxx-xxx/v1_xxx, xxx - xxx.pdf

Best Answer

  • Cloudinary Team
    Cloudinary Team Administrator, Cloudinary Staff Posts: 170 admin
    Answer βœ“

    Hi there,

    Thanks for reaching out.

    I believe you are correct that the comma is causing the issue. Under the hood, the media explorer uses the Admin API. The delete_resources method of the Admin API accepts an array, a comma-separated list of assets to be deleted.
    I can appreciate that it's not a great user experience. I will provide that feedback to the team. But I'm not sure if it should be considered a bug, as a comma is not one of the characters we support for public_ids. Regardless, I will report it to the team, and we'll see what they say.
    You can see the list of supported characters here:
    https://cloudinary.com/documentation/cloudinary_glossary#public_id

    In the meantime, can you try deleting from your media library rather than from the media explorer? While testing on my end, I found that deleting from the media library works without issue.

    Kind regards,

    Tia
    Developer Support Engineer
    Cloudinary

    --
    πŸ’‘ Improve your site's performance by applying optimization features when delivering assets


    πŸ’¬ Community Forums | πŸ§‘β€πŸ’» Discord Server
    πŸ§‘β€πŸŽ“ Academy Training | πŸ“– Documentation | πŸ“° Blog

Answers

  • username123123
    username123123 Member Posts: 3 ✭

    Thank you, using the media library let me delete the file.

    But I'm not sure if it should be considered a bug, as a comma is not one of the characters we support for public_ids

    That makes sense. Though in that case, I would consider it a bug that the upload endpoint doesn't reject public_ids containing commas.

  • DannyFromCloudinary
    DannyFromCloudinary Member, Cloudinary Staff Posts: 150

    Thanks for your feedback. I will be sure to raise this to the relevant team.

    Kind regards,
    -Danny