hnrch02 / multer-ftp

FTP storage engine for multer
MIT License
7 stars 3 forks source link

NO-TRANSFER LIMIT TIMEOUT #4

Closed GuilhermeHausz closed 3 years ago

GuilhermeHausz commented 3 years ago

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(); });

GuilhermeHausz commented 3 years ago

i've changed to JsFTP, it's better