benzino77 / clamav-rest-api

ClamAV REST API. Scan files using simple POST request.
MIT License
105 stars 37 forks source link

Replaced scanStream with passthrough for stability. #50

Closed Evil2000 closed 10 months ago

Evil2000 commented 11 months ago

As described in issue #49 and https://github.com/kylefarris/clamscan/issues/101 it is more reliable to use clamscan.passthrough() rather than scanStream. This PR implements this. In addition it takes care if the input file is of zero size which otherwise results in a hang.

benzino77 commented 11 months ago

Thanks! Will have a look at that when I come back from vacation.

benzino77 commented 10 months ago

Thanks - it is merged. I need to change few things and update tests.