Closed irenab-m closed 1 year ago
Hi, I tried this package. Following error was received: Error: Invalid username at Client.connect
the code: var SftpUpload = require('sftp-upload'), fs = require('fs');
var options = { host: global.LinuxHost, userName: global.LinuxUserName, password: global.LinuxPassword, path: global.ProjectPath+'/files/DB_InputFiles/', remoteDir: '/home/helix/AUTOSENTINEL' }, sftp = new SftpUpload(options); sftp.on('error', function(err) { throw err; }) .on('uploading', function(progress) { console.log('Uploading', progress.file); console.log(progress.percent+'% completed'); }) .on('completed', function() { console.log('Upload Completed'); }) .upload();
@irenab-m
Are you sure the username is correct and you pass it successfully?
Hi, I tried this package. Following error was received: Error: Invalid username at Client.connect
the code: var SftpUpload = require('sftp-upload'), fs = require('fs');