ERR_CONNECTION_RESET When I upload large image to Nodejs

Asked

Viewed 56 times

0

Good morning, I’m having a problem when I try to send big image with Ode, formidable use

app.post('/upload/image', (req, res, next) => { var form = new formidable.Incomingform(); form.multiples = true;

form.on('fileBegin', (field, file) => { var filename = Crypto.createHash('md5'). update(file.name). Digest("Hex") + ". png"; file.path = './public/uploads/' + filename; req.session.linkImage = "/uploads/" + filename;

 res.end('uploaded');

});

form.on('error', (err) => { console.log('An error has occured: n' + err); });

form.on('end', (Fields, file) => {

 res.end('success');

});

form.parse(req); });

Could help me solve this problem?

  • This one works on the express https://www.npmjs.com/package/express-formidable

  • For the express is a specific? I will use this and test

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.