![](/img/trans.png)
[英]ERR_CONNECTION_RESET : Error When i try to upload large files using node.js/multer , deployed at elastic beanstalk -nginx Server
[英]ERR_CONNECTION_RESET when upload large file nodejs multer
增加相应上传路由的res
-timeout 肯定会起作用。 尝试这样做:
function extendTimeout (req, res, next) {
// adjust the value for the timeout, here it's set to 3 minutes
res.setTimeout(180000, () => { // you can handle the timeout error here })
next();
})
app.post('/your-upload-route', extendTimeout, upload.single('your-file'), (req, res, next) => {
// handle file upload
})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.