Closed Maleeha456 closed 1 year ago
It looks like lib/types/multipart.js calculates the file size already to check fileSizeLimit. Would you guys consider implementing/accepting a PR for that size to be emitted as a property on the FileInfo that already gets returned for bb.on('file'...)
?
@gazebosx3 That’s not possible in general. fileSizeLimit
is checked as the stream for the file is read, i.e. after the file
event is emitted.
@gazebosx3 As @charmander said, that's not possible. You will need to count the bytes yourself as the file streams in if you need the total size when the stream ends.
That's up to you to keep track of.
busboy
just provides the file streams.