Hi, we currently plan to implement virus detection for uploaded files.
What would be the best way to do that? I was thinking about writing a custom plugin, but i am not sure if that suits our needs. At some point after uploading we need to check the file (by calling an external lib/command/whatever) and if a bad file is detected we have to delete the file and abort the current transaction. Maybe it would be better to overwrite something like “activerecord_before_save”? But i am not sure if i can abort the current upload from there.
We do not want to scan files asynchronously because we have to provide immediate feedback to the user.