You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: