使用NodeJS上传文件时出现问题。
当用户的联系非常缓慢时,会出现问题,正常连接一切正常。
错误讯息:
Bad Gateway
The proxy server received an invalid response from an upstream server.
Apache/2.4.7 (Ubuntu) Server at xxxxxxxxx Port 80
我的代码:
app.use(multer({
dest: './public/uploads/',
limits: {
fileSize: 10485760 // 10485760 octets = 10mo -- 7340032 octets = 7 mo -- = 819200 octets = 800 ko --- 102400 octets = 100 ko --- 5242880 octets = 5 mo
},
onFileSizeLimit: function(file) {
console.log('Failed: ', file.originalname);
fs.unlink('./' + file.path);
},
onFileUploadComplete: function() {}
}));
我认为问题不是由于我的NodeJS代码,但它可能是Apache的一个问题......