nightskyjeff – 03-10 Aug 1

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.
N
NightSkyJeff262d ago
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",
})
)
);
UU
Unknown User260d ago