Discourse doesn’t have such feature. You’d have to build a plugin to scan uploaded files for viruses.