node-ftp icon indicating copy to clipboard operation
node-ftp copied to clipboard

.append doesn't append to file (it overwrites it)

Open nagman opened this issue 6 years ago • 1 comments

Hi,

I'm trying to add lines to a distant file on an FTP server, but the append method doesn't seem to append my string to the file.

My code:

const c = new ClientFTP();
c.connect({
  host: ...,
  user: ...,
  password: ...,
});
c.on('ready', function() {
  c.append('foo bar bar foo foo bar foo', 'file.txt', function(err) {
    if (err) throw err;
    c.end();
  });
});

nagman avatar Jul 22 '19 18:07 nagman

Just on the odd chance that the server on the other end is filezilla ftpd, I noticed this comment in a project using this module:

// for some reason filezilla ftp server does not like order REST PASV STOR, but needs PASV REST STOR or else it overwrites the file instead of resuming it ??!

Not that this helps, but...

sp00x avatar Oct 12 '20 12:10 sp00x