Run a Virus Scan While Uploading files in ASP.NET

后端 未结 3 1006
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-05 08:27

I have developed a web based application in ASP.NET and C# where users have the facility to upload files on the server through this application I want the application to Scan th

3条回答
  •  日久生厌
    2021-02-05 08:52

    First of all the file must be saved onto the server before you can scan it. If you notice Yahoo will upload the file first - but not allow the attachment to be sent until scanned.

    Then you can use an antivirus with a command line interface or some other kind of API. Both of these can be called via C# and should provide the functionality you require. Parhaps write a wrapper class that takes a file and returns true or false depending on whether a virus was detected.

提交回复
热议问题