
March 20th, 2002, 09:20 AM
|
 |
Contributing User
|
|
Join Date: Feb 2002
Posts: 320

Time spent in forums: 1 Day 34 m 29 sec
Reputation Power: 12
|
|
|
Virus scanning an uploaded file
The uploading part is elementary, however I wonder how I would go about implementing a virus scan of the file?
A lot of peeps seem to frown on it, but I am probably going to store the file in a database as a blob. I'd prefer handling it this way since any file that is uploaded will be a text file or small batch file. I wouldn't do it this way if I were handling images or other larger files.
The trick is how to I scan it prior to inserting into the db?
Or, I guess the better question is how do I insert a file into mysql db from a linux command prompt?
I can upload the file, run my virus scan with a system command, and abort if virus is found, or return an 'ok' if the file is ok. If ok, do the MySQL insert statement and finish the operation.
|