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 · 3 comments
Open

fileBinary not present in TS definitions for filesDownload #1136

unilynx opened this issue Apr 2, 2024 · 3 comments
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.

@binajmen
Copy link

binajmen commented Jan 5, 2025

No offense but I'm starting to doubt things will change.

  1. It was already reported 7 years ago: https://www.dropboxforum.com/discussions/101000014/javascript-api-clarity---filesdownload/282827
  2. I created a simple PR about another type issue that was never merged after 3 weeks: Update index.d.ts #1146
  3. This repository last commit is from 2 years ago.

I guess my question is: should I write my own javascript wrapper instead? You can be honest :)

@alyx-db
Copy link

alyx-db commented Jan 6, 2025

@binajmen

Thank you for sharing your concerns. We understand how frustrating it can be when an issue persists for an extended period.

While I cannot provide a timeline regarding a resolution, I can assure you that your feedback has been recorded and have noted this concern with our team. In the meantime, creating your own "wrapper" is a valid approach to address your specific needs and maintain functionality within your integration.

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

4 participants