Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

FTP upload local file

var Client = require('ftp');
  var fs = require('fs');
 
  var c = new Client();
  c.on('ready', function() {
    c.put('foo.txt', 'foo.remote-copy.txt', function(err) {
      if (err) throw err;
      c.end();
    });
  });
  // connect to localhost:21 as anonymous
  c.connect();
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged: #FTP #upload #local #file
ADD COMMENT
Topic
Name
7+9 =