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

Can I create a file over the fly ? #57

Open
omkartin opened this issue Aug 15, 2017 · 0 comments
Open

Can I create a file over the fly ? #57

omkartin opened this issue Aug 15, 2017 · 0 comments

Comments

@omkartin
Copy link

omkartin commented Aug 15, 2017

I have dynamic data to be uploaded with custom file name. I would like to create a binary buffer, create a file and load the buffer into the file and then sftp the file.

Please see the following code which uploads a custom file.

let chargesString = 'CHARGES';
let chargesFileName = 'charges.txt';
let buffer = new Buffer(chargesString, 'binary');
Ftp.put(buffer, chargesFileName, function(hadError) {
console.log('Entering');
if (!hadError){
console.log("Charges File transferred successfully!");
} else {
console.error('There was an error uploading the Charges file.', hadError);
}
});
The above code is feasible with ftp which doesnt do sftp.

Is this possible here? If not can you please add that feature.

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

1 participant