Announcement

Collapse
No announcement yet.

SFTP Client download message

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SFTP Client download message

    Support I am not sure what I am doing incorrect, but my file content is not correct. I was thinking I can just connect to an SFTP server read the content of the message. Then sent that message to he destination and then deleted it from the server. But the message that goes to the destination is not correct. Do I need to convert the InputStreamReader to a string?


    var Flist = channel.ls("*.txt");
    logger.info('Number of Files on Server ' + Flist.size());
    if (Flist.size() > 0){
    for(var i=0; i<Flist.size();i++) {
    var filename = Flist.get(i).getFilename();
    logger.info('File Name: ' + filename);
    var stream = InputStreamReader(channel.get(filename))

    logger.info('File Data: ' + stream);

    return stream;
Working...
X