Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
@bffy_smmmers The filesListFolder method doesn't return any file data or shared links. It only returns file metadata. The Dropbox API also doesn't return thumbnail links in general. If you want the original file data, you should call filesDownload. If you want a thumbnail of an image file, you should call filesGetThumbnail. Those return the requested data directly (via fileBlob or fileBinary), but not as a link.
@Greg-DB Thanks, and i am passing in the path to the file, correct? would that not mean the `path_lower` attribute? This does not yield any result for me. Here is my implementation. When i wrap it in a try/catch, i get the error (fetch is not a function) I apologize for not unerstanding, again, I'm new to this. Im trying to put my code in a block, but it gives me an error when i go to post.
async getThumbnail(path: any) {
console.log(`getThumbnail is running with ${path}`)
const data = await this.client.filesGetThumbnail(path)
console.log(<any>data)
//im returning an empty string so it doesnt break anything
return '';
}
@bffy_smmmers You should use .then and .catch to handle the result/error, like this:
dbx.filesGetThumbnail({path: path})
.then(function(response) {
console.log("got filesGetThumbnail response:");
console.log(response);
console.log("got thumbnail data:");
console.log(response.fileBlob);
})
.catch(function(error) {
console.log("got filesGetThumbnail error:");
console.log(error);
});
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on Twitter or Facebook.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!