title: How to upload file using easy-ftp in node?
body: <p>I am trying to upload a file into my hosting server using node and easy-ftp.</p>
  
  <p>I try with the following code:</p>
  
  <pre><code>var EasyFtp = require ("easy-ftp");
  var ftp = new EasyFtp();
  
  var config = {
  
      host:'homexxxxx.1and1-data.host',
      type:'SFTP',
      port:'22',
      username:'u90xxxx',
      password:"mypass"
  };
  ftp.connect(config);
  ftp.upload("/test/test.txt", "/test.txt", function(err){
      if (err) throw err;
      ftp.close();
  });
  </code></pre>
  
  <p>No error message but no file uploaded</p>
  
  <p>I tried the same using promises </p>
  
  <pre><code>const EasyFTP = require('easy-ftp-extra')
  const ftp = new EasyFTP()
  const config = {
          host:'homexxxxx.1and1-data.host',
          type:'SFTP',
          port:'22',
          username:'u90xxxx',
          password:"mypass"
      };
  ftp.connect(config);
  
  ftp.upload('/test.txt', '/test.txt')
    .then(console.log)
    .catch(console.error)
  ftp.upload()
  </code></pre>
  
  <p>The same issued. No file is uploaded. No error in node console.</p>
  
  <p>The config is the same used in filezilla to transfer files. SFTP protocol. Everything working well with filezilla.
  What I am doing wrong?</p>