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

How to stream upload a file with node? #454

Open
Amatewasu opened this issue Dec 27, 2022 · 3 comments
Open

How to stream upload a file with node? #454

Amatewasu opened this issue Dec 27, 2022 · 3 comments
Labels
question Further information is requested

Comments

@Amatewasu
Copy link

How to stream upload a file with Node.js?

Hi, first of all thank you for your library.

Here's a quote of the type of the uploadFile function:

 uploadFile(
    data: NodeFile | BrowserFile | Url | Uuid,
    options: FileFromOptions
  ): Promise<UploadcareFile>

If I have a large file on disk and don't want to load it in memory, how could I do that? Because in the example the file data is already in RAM but I would like to avoid that.

Thanks and have a great day!

@Amatewasu Amatewasu added the question Further information is requested label Dec 27, 2022
@nd0ut
Copy link
Member

nd0ut commented Jan 10, 2023

Hey @Amatewasu,

Unfortunately, we don't support node streams yet.

@Amatewasu
Copy link
Author

Amatewasu commented Jan 10, 2023

Thank you for your answer @nd0ut. I guess there is no way of uploading a file without fully loading it in RAM then?

@nd0ut
Copy link
Member

nd0ut commented Jan 10, 2023

Technically it's possible but isn't implemented in this library. You could use Upload API directly to upload files from the stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

2 participants