QUOTE(Christian J @ Jun 5 2009, 07:44 PM)
QUOTE(Brian Chandler @ Jun 5 2009, 05:10 AM)
probably it's a good idea to have list of the mime types and file extensions you accept, and you can just put the M$ names in with the standard ones.
That's what I do, but I don't know if MS is the only browser vendor that submits proprietary mime types.
There are three types of behaviour:
(a) Standard - just write to the standard, and this is covered
(b) Nonstandard by ordinary entities - well, you can probably ignore these, because ordinary browsers that fail to meet standards get ignored
(с) Nonstandard by abusive monopolies - it's up to you to decide whether or not to do your bit in propping up the abusive monopoly
Remember that the standard specifies a way to specify non-standard mime type, via the x- prefix. There will always be new and experimental formats, so no exhaustive list will last for ever.
QUOTE
But with exif_imagetype() it seems you can check the image file directly, now I just need to find out how to enable it on my testing server. getimagesize() seems to work already.
There's some discussion about this under the php manual page for exif_imagetype:
http://jp2.php.net/manual/en/function.exif-imagetype.phpIt would be a lot easier to make sensible comments if I could understand why you feel you need to know the type of the file being uploaded (for what purpose?) ...
[Edited to put the 'c' back in the list from (a), (b). This brain-dead "filtering" nonsense does not work. Can't we please get rid of it.]