I'm writing a multiple file upload feature for myself.
The problem is that I'll be uploading .psd, .cdr, .indd, .cad, etc. files.
I can easily check whether file is a legit image or not, but is there a similar way of validating the file extensions mentioned above.
EDIT the question is not about checking if file has an extension like psd, cdr etc. I need to be able to verify if the file is a legit PSD or CDR file.