cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Re: How to fetch image from Dropbox to display on website ?

How to fetch image from Dropbox to display on website ?

Navy
Explorer | Level 3

I base on Meteor Vuejs and Dropbox=4.0.15

I uploaded image to Dropbox using Dropbox API , then I want to get image to display on my website. How can I do ?

dbx
.filesListFolder({ path:path})
.then(function(response) {
console.log(response.entries)
dbx
.filesGetTemporaryLink({
path: response.entries[0].path_lower,
})
.then(function(result) {
this.imgUrl = result
console.log('thum', result)
})
.catch(e => {
console.log(e)
})
})
.catch(function(error) {
console.log(error)
})

Result :

sadly it's not work 

Screenshot from 2019-01-26 17-18-25.png

 
3 Replies 3

DBX_Robert
Dropbox Staff

Dropbox is not intended as a content host for website.  The url you generated via /files/get_temporary_link will for the file to download locally.  It cannot be used to embed content within an HTML tag.  Also, the links generated by /files/get_temporary_link are only functional for four hours, after which they will expire.

Navy
Explorer | Level 3

Please , recommended way to upload file(Image...) to cloud and fetch data to display on websit.

DBX_Robert
Dropbox Staff

The workflow you are describing, to upload a file to Dropbox and then embed it in a webpage, is not a workflow that is supported by our API.  If you wish to upload file, you can use our /files/upload API, but we do not offer an endpoint or way to embed content directly in webpages.

Need more support?