I have an Express NodeJS server. I would like to upload very large files (more than 10Gb of size). I tried modules multer
and formidable
for this purpose.
My problem is that I am not able to receive more than 1Gb in the server. In the browser I get ERR_CONNECTION_RESET
. No error thrown by the server code.
My code with formidable
:
var formidable = require("formidable");
form = new formidable.IncomingForm();
form.uploadDir = "./files/";
form.parse(req, function(err, fields, files) {
console.log("received upload");
});
My code with multer
:
var storage = multer.diskStorage({
destination: function (req, file, cb) {
cb(null, "./files")
}
});
var upload = multer({storage: storage}).array("file",2);
/** ------ **/
upload(req, res, function (err) {
if (err) {
console.log("error");
} else { //success!
console.log("received upload");
}
});
Do you have any idea what is going on?