cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We love to hear how every person gets the most from Dropbox, and it seems everyone has a slightly different use for it - tell us yours here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get link to my images using filename not by dropbox-generated ID.

Get link to my images using filename not by dropbox-generated ID.

metaclay
New member | Level 2

 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

1 Reply 1

Re: Get link to my images using filename not by dropbox-generated ID.

Greg-DB
Dropboxer

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

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?