cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

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 thumbnail with TypeScript

Highlighted

Get thumbnail with TypeScript

Explorer | Level 4

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.FileMetaData> so once the promise is resolve I have an object of the type FileMetaData.

This is fine but the FileMetaData object does not have a fileBlob object in it but when I'm doing a console.log(response), I do have a fileBlob in it...

How am I supposed to get the thumbnail in my application without the blob ?

Thank you for any help

1 Accepted Solution

Accepted Solutions
Highlighted

Re: Get thumbnail with TypeScript

Dropboxer

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.

View solution in original post

3 Replies 3
Highlighted

Re: Get thumbnail with TypeScript

Dropboxer

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.

View solution in original post

Highlighted

Re: Get thumbnail with TypeScript

Explorer | Level 4

Thank you for your reply.

Is there any way for me to get to know when this is fixed ?

 

Highlighted

Re: Get thumbnail with TypeScript

Dropboxer

Yes, I'll follow up here once I have an update on that. I can't offer a timeline for a fix though, so please use the workaround for now.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?