-
Notifications
You must be signed in to change notification settings - Fork 355
Open
Labels
Description
Describe the bug
Property 'fileBinary' does not exist on type 'FileMetadata'.
To Reproduce
import { Dropbox } from "dropbox";
const dbx = new Dropbox({ accessToken: '...' });
const fileinfo = await dbx.filesDownload({ path: '...' });
console.log(fileinfo.result.fileBinary);
This will give the aforementioned TypeScript error, although fileBinary does actually exist if you console.log the object:
DropboxResponse {
status: 200,
...,
result: {
name: 'Mambo Kurt - Paradise City.mp3',
path_lower: '/mambo kurt - paradise city.mp3',
path_display: '/Mambo Kurt - Paradise City.mp3',
id: 'id:cVRCL-ln7TwAAAAAAAAABg',
client_modified: '2024-04-02T12:00:42Z',
server_modified: '2024-04-02T12:00:42Z',
rev: '6151bdaff690d91f858d3',
size: 1425936,
is_downloadable: true,
content_hash: '5d6fd78d1255d1072341a7c51552b3fc430a5f17e4d00eff6f15c249aa25d44c',
fileBinary: <Buffer ff fb 90 6c 00 0f f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... 1425886 more bytes>
}
}
Expected Behavior
I'd expect no compilation errors
I would expect fileBinary: Buffer
in the FileMetadata
type, or something like fileBlob
?
(Issue #809 might be related but is looking for a fileBlob, not a fileBinary)
Actual Behavior
Compilation fails.
Versions
-
What version of the SDK are you using?
10.34.0 -
What version of the language are you using?
Node 20 -
Are you using Javascript or Typescript?
TypeScript