pirumpi / sftp-upload

Allow to upload the content of a folder to a remote server through SFT utilizing pure Javascript.
40 stars 21 forks source link

sftp is faking and not upload #4

Closed jainmnsh closed 7 years ago

jainmnsh commented 9 years ago

hello, I am using code along with sftp module to upload the files and its working as expected but when the process completed and on completed method get called and I check on server, the files does not show on server..

can you please help me.

thanks Manish

var option = { host: "oxxxx", port: "22",

username: "xxx",
password: "xx",
remoteDir: "/users",
path: "/upload/",
protocol: "sftp"

};

var sftp = new ftpClient(option);

sftp.on('error', function (err) {
    console.log(err);
    logger.debug('error ' + JSON.stringify(err));
})
    .on('connect', function(conn){
        logger.debug('connect ' + JSON.stringify(conn));
    })
    .on('uploading', function (pgs) {
        logger.debug('uploading ' + pgs.file);
        logger.debug('uploading ' + JSON.stringify(pgs));
    })

    .on('completed', function () {
        logger.debug('compleed ');
        callback(null,'Success')
    })
    .upload();
pirumpi commented 9 years ago

You were able to find the issue and fixed right? If so, I would appreciate a pull request so everyone else can enjoy your fix.

arliber commented 8 years ago

Having the same issue here... ant fix?

pirumpi commented 8 years ago

@LeonLiber do you have the right permission to the remote server? Are you able to login from the terminal to the remote server?

pirumpi commented 7 years ago

Is this still an issue? I would like to close this bug

jainmnsh commented 7 years ago

There were some other issues around it so we end up using scp2 module directly. since then no issues.

pirumpi commented 7 years ago

I'm not able to replicate this issue on my local environment