dropbox-sdk-js icon indicating copy to clipboard operation
dropbox-sdk-js copied to clipboard

Incomplete Documentation For filesGetThumbnail

Open pneyrinck opened this issue 8 years ago • 4 comments

The docs do not describe how the thumbnail data is returned. Via debugging I see a string property named fileBinary. The docs have no mention of this property anywhere.

pneyrinck avatar Oct 08 '17 18:10 pneyrinck

Thanks for pointing that out! Using fileBinary is the correct way of accessing the resulting data in node. (In the browser, it's fileBlob.) I'll ask the team to add this to the documentation.

greg-db avatar Oct 09 '17 17:10 greg-db

This is a limitation / issue with the Stone API specification. The Dropbox JS SDK manually adds fileBinary/fileBlob to the object because that property isn't in the Stone API specification. As a corollary, the TypeScript definition files lack these properties, and require hacky typecasting to 'any' to compile.

If you fix this in a generic manner (through e.g. arguments to the Stone generators that pass in library-specific augmentations to the Stone specification), then you could kill two birds with one stone -- improve the TypeScript definition files and correct the documentation.

jvilk avatar Feb 11 '18 19:02 jvilk