Forum Moderators: coopster
I like to check all this out during the upload process myself and if it doesn't meet my criteria I stop the process and let the user know why. However, if the file is already there for some reason and you want to check it you could have a look at the filename extension, you might use the Exif functions [php.net] and there is also the mime_content_type() [php.net].