Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fileBinary not present in TS definitions for filesDownload #1136

Open
unilynx opened this issue Apr 2, 2024 · 1 comment
Open

fileBinary not present in TS definitions for filesDownload #1136

unilynx opened this issue Apr 2, 2024 · 1 comment
Labels

Comments

@unilynx
Copy link

unilynx commented Apr 2, 2024

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

@unilynx unilynx added the bug label Apr 2, 2024
@greg-db
Copy link
Contributor

greg-db commented Apr 2, 2024

Thanks for the report! I'll ask the team to fix that up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants