Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot upload and download #15

Open
kingeaglewang opened this issue Jun 25, 2018 · 1 comment
Open

Cannot upload and download #15

kingeaglewang opened this issue Jun 25, 2018 · 1 comment

Comments

@kingeaglewang
Copy link

I have downloaded the code from the git

`var config1 = {
"host": "XXX",
"port": 21,
"username": "XXX",
"password": "XXX",
"type":"ftp"
};;

var loop = require('easy-loop');
var EasyFTP = require('../main');

var ftp1 = new EasyFTP(config1); //13967.730ms , 148819.925ms
//var ftp1 = EasyFTP.Parallel(config1, 3); // 56392.136ms, 49064.603ms
ftp1.on("open", function(client){
console.log("event open");
console.time("time");
//ftp1.upload("C:/test/images", config1.path, function(err){
ftp1.download("/AAAAAA5EEDF4/VIDEO/2018_0522_095610_001.MP4", "D:/test.MP4", function(err){
console.log(arguments);
console.timeEnd("time");
end();
});
});
ftp1.on("upload", function(){
console.log("event upload", arguments);
});
ftp1.on("download", function(){
console.log("event download", arguments);
});
ftp1.on("error", function(err){
console.log("event error1", err);
end();
});
ftp1.on("close", function(){
console.log("event close1");
});
//ftp1.cd(config1.path, function(){

//});

function end(){
try{ftp1.close();}catch(e){}
}`

And I use node easy-ftp-test.js to run the example code.
But the download process is not successful.
I watch from the FTP server side, it keeps recevicing pwd command, and download is stuck.

image

What's wrong in the code ?
Thanks for reply.

@humy2833
Copy link
Owner

Please update to version 0.3.44 and try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants