You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code above will just "hang" if largefile.txt is more than twice the highWaterMark. For fs, the default water mark is 64KB. So, if the file is say 200KB, the upload code will hang.
The text was updated successfully, but these errors were encountered:
gramakri
changed the title
Uploading a large file using req.pipe() does not work
Uploading a large file using stream.pipe(req) does not work
Dec 17, 2021
Uploading files larger than the read stream's highWatermark does not work.
This is tested with node 16.13.1
Sample server:
You can test the server itself works using
curl -F file=@largefile.txt -X POST http://localhost:3000/upload
Superagent upload code:
The code above will just "hang" if largefile.txt is more than twice the highWaterMark. For fs, the default water mark is 64KB. So, if the file is say 200KB, the upload code will hang.
The text was updated successfully, but these errors were encountered: