Closed ChenYangY closed 9 months ago
const express = require('express'); const fileUpload = require('express-fileupload'); const app = express(); app.use(fileUpload({ limits: {fileSize: 100 * 1024}, abortOnLimit: true, limitHandler: (req, res) => { res.json({error: 'error'}); } })) app.post('/upload', (req, res) => { res.end('next'); }) app.listen(8686);
this is my test code.
it happened some error when i uploaded an file(greater than 100kb).
Error [ERR_STREAM_WRITE_AFTER_END]: write after end
so i want the process abort at limithandler, what should i do?
node: 14.16.0 express: 4.17.1 express-fileupload: 1.2.1 platform: mac
Hi,
This issue has been solved in version 1.4.2.
this is my test code.
it happened some error when i uploaded an file(greater than 100kb).
Error [ERR_STREAM_WRITE_AFTER_END]: write after end
so i want the process abort at limithandler, what should i do?
node: 14.16.0 express: 4.17.1 express-fileupload: 1.2.1 platform: mac