cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We recently received a question asking for advice on how to set up a Dropbox account for an elderly family member. This prompted us to think about the different ways we can make Dropbox more accessible in general, learn about it and add your tips right over here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
1
Ask
2
Comments

Get shareable links that I can use in <image href>

Get shareable links that I can use in <image href>

kunaljx86
New member | Level 2

Hello, I would like to use Dropbox to store images received on my backend. I would also like to get access to the URL that I can directly use in <image href> in frontend. However, going through /upload API I can't find any property in response that corresponds to a URL.

I am using NodeJS + Express as my backend. Any help would be appreciated. Thank you

1 Accepted Solution

Accepted Solutions

Re: Get shareable links that I can use in <image href>

kylea
Dropboxer

Generating a direct link for use in an <image href> isn't recommended.

 

Instead, I'd recommend one of two options:

  • Use the Dropbox Embedder to display files. Instead of an image href, you'd use a Dropbox shared link (which you can create with the sharing API) as the input to a javascript snippet.
  • Use the thumbnail API to get efficient thumbnails of content, and serve them through your app (and power downloads with our download API, if applicable).

View solution in original post

4 Replies 4

Re: Get shareable links that I can use in <image href>

kylea
Dropboxer

Generating a direct link for use in an <image href> isn't recommended.

 

Instead, I'd recommend one of two options:

  • Use the Dropbox Embedder to display files. Instead of an image href, you'd use a Dropbox shared link (which you can create with the sharing API) as the input to a javascript snippet.
  • Use the thumbnail API to get efficient thumbnails of content, and serve them through your app (and power downloads with our download API, if applicable).

Re: Get shareable links that I can use in <image href>

kunaljx86
New member | Level 2
Ok thank you

Re: Get shareable links that I can use in <image href>

benfsmith
Explorer | Level 4

Does not recommended equate to not possible? I’m not trying to host in a web page, yet still need a direct link

Re: Get shareable links that I can use in <image href>

Greg-DB
Dropboxer

@benfsmith While the Dropbox API does offer the ability to programmatically create (temporary) direct links, the documentation notes "This URL should not be used to display content directly in the browser.". I can't speak to whether or not this would happen to work for your use case in practice, but Dropbox doesn't officially support it, so we wouldn't be able to offer help with any issues that may arise with that.

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    benfsmith Explorer | Level 4
  • User avatar
    kunaljx86 New member | Level 2
  • User avatar
    kylea Dropboxer
What do Dropbox user levels mean?
Need more support?