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

I propose to add a type for the Buffer file #520

Open
deniszhigalov opened this issue Dec 7, 2022 · 1 comment
Open

I propose to add a type for the Buffer file #520

deniszhigalov opened this issue Dec 7, 2022 · 1 comment

Comments

@deniszhigalov
Copy link

I pass Buffer to Upload and it works for me, but I use typescript and it tells me that the type cannot be Buffer. If Upload takes Buffer type please fix it. Thank you for understanding.

@Acconut
Copy link
Member

Acconut commented Mar 26, 2023

I agree, we should also cover the Buffer type and not only Blob from the browser:

constructor(file: File | Blob | Pick<ReadableStreamDefaultReader, 'read'>, options: UploadOptions)

Would you be willing to open a PR for this?

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

No branches or pull requests

2 participants