javascript - ftps module connects but hangs up -


I am using the module and I have been installed on Sigwin lftp. I'm having trouble because my node JS app looks like it's connecting properly but any of my commands are running, the documentation for the module is not very wide, so I'm trying to make sure I run it What can i do for I am ready to receive a file from the FTP site.

Here's my code:

  var ftps = require ('ftps'); // ftps connection var ftp = new ftps ({host: 'test.ftpsite.com', user name: 'test', password: 'test', protocol: 'sftp'}); // View on remote directory console.log (ftp); Ftp.cd ('TestDir /') Obtain ('/ UploadTest.txt', '/cygdrive/c/Users/Administrator/UploadTest.txt').exec(console.log);  

Output:

  CMO-application-server & gt; Node app.js {option: {host: 'test.ftpsite.com', username: test ', password:' test '}, CMDS: []}  

In this output At the point, the app is just hanging because it is trying to run the command. I'm running it for about 10 minutes and still nothing.

For SFTP, here's how you can do it with the module:

< Pre> var connection = required ('ssh2'); Var ssh = new connection (); Ssh.on ('ready', function () {ssh.sftp (function (err, sftp)} {throwing err}; sftp.fastGet ('TestDir / UploadTest.txt', '/ cygdrive / c / users / Administrator / UploadTest.txt ', function (mistake) {if (mistake) becomes a mistake; ssh.end ();});})}} Connect ({host: 'test.ftpsite.com', Port: 22, Username: 'test', password: 'test'});

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -