Closed devalexqt closed 2 years ago
Opine doesn't provide out of the box behaviours for large files, you will need to either write custom code to consume the request yourself or use a third party middleware for processing.
Refer to docs on req.body
--> https://github.com/cmorten/opine/blob/main/.github/API/request.md#reqbody
As the body is large, would not recommend reading it all into memory as the example suggests, but instead in chunks (potentially writing to disk) using something like multipart/form-data
.
If looking to write your own, recommend checking out how it is done in Oak --> https://github.com/oakserver/oak/blob/main/multipart.ts
How to upload big file 1G ?