Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
DavidM27
6 years agoExplorer | Level 4
Get thumbnail with TypeScript
Hello,
I'm trying to get the thumbnail of an image with the js sdk implemented in a TypeScript application.
I'm using th method fileGetThumbnail() it return a Promise<DropboxTypes.files.FileMeta...
- 6 years ago
Using the "fileBlob" property is the right way to get the thumbnail data. Currently, you'll need to access it like this though: https://github.com/dropbox/dropbox-sdk-js/blob/master/examples/typescript/download/download.ts#L10
Apologies this isn't better documented or included in the TypeScript definitions! I'll ask the team to fix that up.
bffy_smmmers
5 years agoHelpful | Level 5
Greg-DB how exactly do i get access to the shared link that is needed? i dont see it being returned on `filesListFolder`. I dont quite understand what I'm meant to pass in in order to return it and use it to get the thumbnail on the node backend. In the example the user is prompted for the shared link.
Greg-DB
Dropbox Community Moderator
5 years agobffy_smmmers Those examples happen to use sharingGetSharedLinkFile, which is a way to retrieve file data from a shared link. That's just an example though, and may not be the right method for your own use case, such as if you're not working from a shared link to begin with. There are other methods for other use cases, but other content download methods enable access to the resulting file data in the same way (i.e., via fileBlob or fileBinary).
So, for instance, if you just want to download a file from the connected account directly, not via a shared link, you would probably want to use the filesDownload method instead. You would pass in the path for the file that you want to download. You can get the path from elsewhere on the API, such as filesListFolder/filesListFolderContinue, etc.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!