How to list cloudinary folders and files
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?
Best Answer
-
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 insights1
Answers
-
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#foldersAgain, 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 theprefix
parameter. The value of the prefix will be your folder name.
https://cloudinary.com/documentation/admin_api#get_resourcesI'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 insights0 -
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.
0 -
OK thanks
0 -
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:
0