How to list cloudinary folders and files

Options
rwahdan
rwahdan Member Posts: 51 โœญ

I need to show folders in my api applications. after clicking on specific folder, I want to show all files in that folder but in GUI way. Is it possible?

Tagged:

Best Answer

  • Cloudinary Team
    Cloudinary Team Administrator, Cloudinary Staff Posts: 141 admin
    Answer โœ“
    Options

    Hi there,

    Thanks for the additional information. So what I said in my previous message is correct. You can get the data you need with the Admin API. But you will need to handle how you build that out for display on your front-end.
    It sounds like an interesting project. Would love to see your final result when you've got it up and running.

    Kind regards,

    Tia

    Helpful Links For You
    ๐Ÿ’ฌ Share questions, connect with other users in our Cloudinary Community forums and Discord server!
    ๐Ÿง‘โ€๐ŸŽ“ Join our Cloudinary Academy for free courses, workshops and other educational resources.
    ๐Ÿ“„ Read our documentation for in-depth details on Cloudinary product features and capabilities
    ๐Ÿ“ฐ Check out the Cloudinary blog for the latest company news and insights

Answers

  • Cloudinary Team
    Cloudinary Team Administrator, Cloudinary Staff Posts: 141 admin
    Options

    Hi there,

    Thanks for reaching out.

    You can use the Admin API to get a list of all folders:
    https://cloudinary.com/documentation/admin_api#folders

    Again, you will use the Admin API to get a list off all assets in a folder. You will use the resources method and be sure to pass the prefix parameter. The value of the prefix will be your folder name.
    https://cloudinary.com/documentation/admin_api#get_resources

    I'm not sure what you mean by 'show all files in that folder but in a GUI way'. Maybe you can explain a bit more about what you are trying to build.
    But my instinct is that there will not be an out-of-the-box way to do this. It should certainly be possible, but you will need to write the code for that.

    I hope this helps. If you have any questions, just let us know.

    Kind regards,

    Tia

    Helpful Links For You
    ๐Ÿ’ฌ Share questions, connect with other users in our Cloudinary Community forums and Discord server!
    ๐Ÿง‘โ€๐ŸŽ“ Join our Cloudinary Academy for free courses, workshops and other educational resources.
    ๐Ÿ“„ Read our documentation for in-depth details on Cloudinary product features and capabilities
    ๐Ÿ“ฐ Check out the Cloudinary blog for the latest company news and insights

  • rwahdan
    rwahdan Member Posts: 51 โœญ
    Options

    Thanks for the reply.

    I'm not sure what you mean by 'show all files in that folder but in a GUI way'. Maybe you can explain a bit more about what you are trying to build.

    What I mean is that I need to show all folders that look like windows explorer wehere we see folders and by clicking on that we see all the files inside that folder.

  • rwahdan
    rwahdan Member Posts: 51 โœญ
    edited March 16
    Options

    OK thanks

  • Zachary
    Zachary Member, Cloudinary Staff Posts: 35
    Options

    Hey there,

    Thanks for clarifying. I would recommend checking out the Media Library Widget for a UI solution. With the MLW, all your users can easily select images, videos, PDFs, or other stored raw files directly from Cloudinary and insert them in a way that exactly fits your application design, required behavior, and overall workflow.

    You can read more about it via our documentation: