Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setup(bucketName, operatorName, password) {
const ftpClient = new Ftp()
ftpClient.on('ready', () => {
console.info('--------------- ftp 连接成功 ---------------')
})
ftpClient.on('close', error => {
console.info('--------------- ftp 已关闭 ---------------')
})
const connect = async () => {
return new Promise((resolve, reject) => {
ftpClient.connect({
host: 'v0.ftp.upyun.com',
user: `${operatorName}/${bucketName}`,
password: password,
})
ftpClient.once('ready', resolve)
})