node-ftp
node-ftp copied to clipboard
.append doesn't append to file (it overwrites it)
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();
});
});
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...