There is some useful ways to monitor what's going to be uploaded onto your server.
First is to use a behaviour in Dreamweaver 4 developed by Massimo Foti (
"Check Image Upload 1.1" that allows you to recognize many image details before the file is uploaded such as dimensions, size etc.
The second is to use a CF custom (free) tag that's named "CF_imagesize" that you may find on Allaire site.
With this tag you may discard all the files that do not match GIF and JPG requirements, such as dimensions and type of GIF (87 or 89) and Jpeg compression ratio.
Infact these parameters can't be easily embedded into an infected file in the right position.
To distinguish a possible executable file you may follow the same approach of CF_imagesize simply reading the header of the file.
An executable file has many parameters that may be read and discovered.
The ultimate possibility is to install onto your server a detection program (there are many of them specifically designed for this purpose) and to call them via a custom tag that executes the check over the uploaded file and may get back some alarm condition parameters.
All these ways have benefits and drawbacks. Choose the one (the the ones) that better meets your requirements.
Have a nice weekend.
Sergio