One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
metaclay
4 years agoNew member | Level 2
Get link to my images using filename not by dropbox-generated ID.
Hi i'm trying to make my personal dynamic web. Where i need to get access to my images stored in dropbox. But i need to get the link by its filename , not by ID generated by dropbox. I'm storing my filename in my database ( i use google sheet to store the list of filenames) :
image_001.png
image_002.png
etc
So the my webpage will request this filename from the database (for example when users choose the filename from dropdown menu in my homepage) then it will generate dynamic link to the image for example : <img src="_whatever_filename_selected_by_user_">.
Also i heard about temporary link API but it's temporary and will expired. I want it to be permanent. Is it possible ?
If i have to use the ID then i have to input the ID manually one by one to my database, but if i have 1000 images, definitely i don't want to do that. Is there any method to retrieve for example in current folder i can get the list of all ID and its corresponding filename at once so i can easily input to my database. Any tips or idea ?
Or does anyone know any other image hosting that can offer this feature ?
Thanks
- Greg-DB
Dropbox Staff
To get a (non-temporary) shared link via the Dropbox API, you can call the /2/sharing/create_shared_link_with_settings endpoint. You will need to identify the desired file in Dropbox, which you can do by file path or ID. You can modify the resulting links for different behaviors if needed.
To make that call, if you are able to construct the Dropbox file path directly from the filename information you have stored in your database, you can do so that way. Otherwise, you could use the /2/files/list_folder[/continue] endpoints to list the contents (including paths and IDs of files) under any particular path
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,940 PostsLatest Activity: 23 hours ago
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 or Facebook.
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!