I'm having this problem in multer-ftp, i'm connecting and sending my files, but after 10 minutes I get this message because I don't found a method to disconnect from FTP and then got a new request every time for 10 consecutive minutes...
My code:
let upload = multer({
storage: new ftpStorage({
connection: ftpClient,
//This ftp:... is the first try to connection end, but they don't accept any end or logout method...
// ftp: ftpConfig.ftp,
basepath: '*****',
destination: function (req, file, options, callback) {
callback(null, path.join(options.basepath, file.originalname));
},
})
}).any()
upload(req, res, function (err) {
//Have some codes here to check the file is valid or no
//And i'm trying to finish with this ftpClient.end();
//The connection closes, but in backgroud aparently don't close
ftpClient.end();
});
I'm having this problem in multer-ftp, i'm connecting and sending my files, but after 10 minutes I get this message because I don't found a method to disconnect from FTP and then got a new request every time for 10 consecutive minutes... My code:
let upload = multer({ storage: new ftpStorage({ connection: ftpClient, //This ftp:... is the first try to connection end, but they don't accept any end or logout method... // ftp: ftpConfig.ftp, basepath: '*****', destination: function (req, file, options, callback) { callback(null, path.join(options.basepath, file.originalname)); }, }) }).any()
upload(req, res, function (err) { //Have some codes here to check the file is valid or no //And i'm trying to finish with this ftpClient.end(); //The connection closes, but in backgroud aparently don't close ftpClient.end(); });