If I try more then 10 files I got the warning, but the other files are not uploaded, I cannot upload more than 10 files. What am I doing wrong?
{ node
This worked for me: https://github.com/theophilusx/ssh2-sftp-client/issues/73
const putFiles = (sftpConfig, fileList) => {
const sftp = new sftpClient()
return new Promise(function(resolve, reject) {
sftp
.connect(sftpConfig)
.then(() => {
return Promise.all(fileList.map(args => {
return sftp.put.apply(sftp, args)
}))
})
.then(() => sftp.end())
.then(resolve)
.catch(reject)
});
}