1

I want to upload media and textual files inside the database for my personal use. I have been successful in adding all the files to the database, but I want to scan each file for viruses before uploading it into the database so that a infected file could not be stored inside the database.

How would I scan a file for viruses before upload in VB.NET?

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
A.J.
  • 8,557
  • 11
  • 61
  • 89

1 Answers1

1

Use System.Diagnostics.Process and start a command-line anti-virus program, such as clam-av.

Of course, that means you need to save the file in a temporary directory first.

Stefan Steiger
  • 78,642
  • 66
  • 377
  • 442