Regarding virus scanning, the following will scan each uploaded file using Microsoft Defender:
Microsoft Defender will automatically take remedial action if a virus is found. If you need to define your own actions then you can use a batch script that checks the errorlevel returned by MpCmdRun, which will be 2 if a virus is found.
You can also script more complex actions using Powershell or Javascript if necessary.