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
at index.js line 90: modified source code bellower:
function onFile(fieldname, file, filename, encoding, mimetype) {
if (checkFile) {
// var err = checkFile(fieldname, file, filename, encoding, mimetype)
// if (err) {
// // make sure request stream's data has been read
// var blackHoleStream = new BlackHoleStream();
// file.pipe(blackHoleStream);
// return onError(err)
// }
checkFile(fieldname, file, filename, encoding, mimetype, function (err) {
if (err) {
// make sure request stream's data has been read
var blackHoleStream = new BlackHoleStream();
file.pipe(blackHoleStream);
return onError(err)
}
})
}
======================then = at your app code =========
parts = parse(this, {
"checkFile": function (fieldname, file, filename, encoding, mimetype,cb) {
file.on("limit", function () {
var err = new Error('=====file size ======')
err.code = 'Request_fileSize_limit'
err.status = 400;
cb(err);
//return err;
});
Probably a follow-up to #22: no
length
property.https://github.com/andrewrk/node-multiparty provides
part.byteCount
(where possible), could be nice to have it here. Guess, an issue for the original busboy?The text was updated successfully, but these errors were encountered: