Closed jsatk closed 6 years ago
Please try like this. I beleive no need to use c.list instead you can use like c.get('folderName/test.xml', function (err, stream)
c.on('ready', function () { c.get('folderName/test.xml', function (err, stream) { if (err) { console.log("Error in FTP to get/Read the file: " + +err.message); return; }; stream.once('close', function () { c.end(); }); stream.pipe(fs.createWriteStream('test.xml')); }); }); callback(null); }, 0);
Also I want to know where you are deploying this code?
Closing as this is simply outdated and no longer a concern.
Sample code above.
get
does not return astream
. What am I doing wrong?