Changelog
[2.2.0] - 2023-07-22
Changelog
[2.1.0] - 2023-07-21
request.unpipe()
was called on error. Now, an approach inspired by Multer source code was taken:
Unpipe the request stream from the parser
Remove all event listeners from the parser
Resume the request stream.
Why req.resume()
and not req.pause()
?
Why not req.destroy()
?
res.end()
should be enough.Changelog
[2.0.0] - 2023-07-13
For migration guide, check comments on file system and S3 upload examples.
bytesWritten
, bytesRead
, truncated
getters to ByteLengthTruncateStream
class.maxFileByteLength
error handling: maxFileByteLength
now works as expected and throws an error when the file size exceeds the limit. ByteLengthTruncateStream
now directly throws the maxFileByteLength
Error
. Previously, only the byteLength
property (the event handlers inside the promise creation) were responsible for throwing the length limit error; which meants that if you don't use and properly error-handle the byteLength
promise, in case file byte length limit was reached, it'd trigger an unhandled promise rejection.