R
Reactiflux

nightskyjeff – 03-10 Aug 1

nightskyjeff – 03-10 Aug 1

NNightSkyJeff8/1/2023
I'd like to use ssh2-sftp-client's sftp.get(filename, writableStream) in conjunction with a pipeline, so that I don't need to store the writableStream contents somewhere first and then read from there to go through the pipeline. I think I figured it out, with Transform and .pipe()
await ssh.get(
filenameCsv,
transform
.pipe(csvParser)
.pipe(jsonToCsv)
.pipe(
bucket.file(filenameCsv).createWriteStream({
resumable: false,
validation: false,
contentType: "auto",
})
)
);
await ssh.get(
filenameCsv,
transform
.pipe(csvParser)
.pipe(jsonToCsv)
.pipe(
bucket.file(filenameCsv).createWriteStream({
resumable: false,
validation: false,
contentType: "auto",
})
)
);
UUUnknown User8/2/2023
Message Not Public
Sign In & Join Server To View

Looking for more? Join the community!

R
Reactiflux

nightskyjeff – 03-10 Aug 1

Join Server