How to use the ftp function in ftp

To help you get started, we’ve selected a few ftp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aniiantt / updrive / src / renderer / api / upyunFtp.js View on Github external
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)
      })

ftp

An FTP client module for node.js

MIT
Latest version published 10 years ago

Package Health Score

70 / 100
Full package analysis