Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
affannode
12 months agoNew member | Level 1
Getting the files (svgs and images) in a public Dropbox folder
I have a public Dropbox folder that would have a bunch of files in it (the user can paste their own public link). In that folder, I want to be able to get all the files that are there; specifically images.
I would like to get their names, links, thumbnails etc and then have the user download them. For now, I would just like to see what files are in a folder. Any help on how I can achieve this would be greatly appreciated. I am using the Javascript SDK.
3 Replies
- Greg-DB12 months ago
Dropbox Community Moderator
[Cross-linking for reference: https://stackoverflow.com/questions/79284194/how-to-download-files-from-a-public-dropbox-and-onedrive-folder ]
Using the Dropbox JavaScript SDK, to list the contents of a folder using a shared link to the folder, use the filesListFolder/filesListFolderContinue functionality. Send the shared link URL in the shared_link.url parameter in FilesListFolderArg.
The get the shared link metadata for the shared link, or any particular item in the linked folder, use sharingGetSharedLinkMetadata. Send the shared link URL in the 'url' parameter and the relative path to the desired child file/folder, if any, in the 'path' parameter.
To download any particular file in the folder, use sharingGetSharedLinkFile. Send the shared link URL in the 'url' parameter and the relative path to the file in the 'path' parameter.
To get the thumbnail of any particular file in the folder, use filesGetThumbnailV2. Send the shared link URL in the resource.url parameter, and the relative path to the file in the resource.path parameter
- affannode12 months agoNew member | Level 1
This looks good. I looked around more and came across the Chooser (https://www.dropbox.com/developers/chooser) . And I think theoretically, this could work? Because this returns a URL and so anyone can just pick a image from their available folders on Dropbox. Based on the return URL, I'm guessincan download these images using the download npm package.
- Greg-DB12 months ago
Dropbox Community Moderator
Yes, you can use the Dropbox Chooser to have the end-user select any file or folder from their account to send a shared link for that item to your app.
About Discuss Dropbox Developer & API
Make connections with other developers
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!