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'm working in a scenario that it's not desirable to have any files in disc, so I'm trying to use the options "toStdout" and "fromStdin"
I had success using only "toStdout" but loading the data from a file on the disc (helped me a lot) but I'm having problem when combing both options...
This is my code (more or less) ....
const sevenStream = Seven.extractFull(null, null, {
$bin: pathTo7zip,
toStdout: true,
fromStdin: '',
});
const { _childProcess: childProcess } = sevenStream;
// piping a readableStream that contains the data for a compressed file into childProcess.stdin
readableStream.pipe(childProcess.stdin);
// here I'm trying to extract the de-compressed information from
// childProcess.stdout ...
// this code works fine if I load the data from a disc file (instead of stdin)
childProcess.stdout.setEncoding('utf8');
let chunkHolder = '';
childProcess.stdout.on('data', (chunk) => {
console.log(`Received ${chunk.length} bytes of data.`);
chunkHolder += chunk;
});
return childProcess.stdout.on('end', async () => {
console.log('uploading file from childProcess.stdout...', { uploadPath, inboundBucket });
await s3.uploadS3Content(chunkHolder, uploadPath, inboundBucket);
// Delete file from the FTP server
console.log('deleting FTP file...', { ftpPath });
await FTP.deleteFile(ftpPath);
return innerResolve();
});
The text was updated successfully, but these errors were encountered:
Hi, and thank you for the interest.
I've written a test case that may help you with the fromStdin part. It's in this commit 6a337ad
Let me know if helps !
Hello, first of all amazing library!
I'm working in a scenario that it's not desirable to have any files in disc, so I'm trying to use the options "toStdout" and "fromStdin"
I had success using only "toStdout" but loading the data from a file on the disc (helped me a lot) but I'm having problem when combing both options...
This is my code (more or less) ....
The text was updated successfully, but these errors were encountered: