I was wondering, if I was making a file or image hosting/transfer site, whether or not there was a good approach to check for viruses for files that users are uploading?
I was thinking of this:
- Use traditional PHP file upload form to upload the file to the server.
- Put files in a queue folder
- Move the queue folder to a "process" folder, and replace queue folder after a predetermined limit (time, cronjob, file count, collective file size)
- Run a command line virus scan on files in process folder
- Place safe files in holding area for use
Is this a good approach?