8000 GitHub - lsdfly/ftp-utils
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lsdfly/ftp-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

install

yarn add ftp-utils
or
npm i ftp-utils
const ftp = require('ftp-utils')
let c = new ftp({
    host: 'xxxx.my3w.com',
    user: 'xxxx',
    password: 'xxxx',
    //远程目录
    remotePath: '/htdocs/xxx/',
    //本地目录
    localPath: 'dist',
}).connect(function () {
    let _this = this;
    this.upload(function(res){
         console.log('上传进度:',res.percent);
         console.log('远程路径:',res.remotePath);
         if(res.percent==100){
             //关闭连接
            _this.destroy(); 
         }
    })
    this.on('progress',function(res){
         console.log('上传进度:',res.percent);
         console.log('远程路径:',res.remotePath);
    })
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0