Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to pass the file through the stream #3

Closed
ksmithut opened this issue Mar 24, 2016 · 1 comment
Closed

Allow to pass the file through the stream #3

ksmithut opened this issue Mar 24, 2016 · 1 comment

Comments

@ksmithut
Copy link

Using the stream functionality, It would be awesome if I could pass the stream through the other side.

Example:

  1. Accept a read stream
  2. pass the read stream through clamav.js
  3. pass the now verified read stream to a gzip stream
  4. pass the gzipped stream through an encryption stream
  5. pass the stream to the write stream (external storage service like s3 or just the file system)

The line of code I'm looking at is here: https://github.com/yongtang/clamav.js/blob/master/index.js#L120

It seems to be swallowing the callback I would need to reuse the stream. Or perhaps this is already supported?

@ksmithut
Copy link
Author

Nevermind, we found a different way of doing it. We're just going to split the stream and have one stream pipe into clam, and the other save the file and mark it as unopenable until clam does it's thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@ksmithut and others