I know that from security standpoint this is not safe. But I intend to use the javascript code for convenience. So just as a first pass. My goal is to avoid any false-positives i.e. it is fine if a malicious hacker manipulated the file to have the mime-types that I accept (because I will be doing a second pass on server side) but I I would want to prevent legal files being detected as problematic.
UPDATE
Prototype of a working solution http://jsfiddle.net/tankchintan/5EUjE/1/