Re: How reliable is mime type in $_FILES superglobal.
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: How reliable is mime type in $_FILES superglobal.

From: NC <nc@iname.com>
Date: Mon Jan 30 2006 - 22:51:17 CET

splodge wrote:
>
> I am working on a portal, part of which allows users to upload files.
> Part of the array within $_FILES superglobal gives the mime type for the
> file. Is this 100% reliable / accurate? If the mime type says the file
> type is jpeg is it always right?

It depends on your definition of "right"... If I understand correctly,
MIME type is determined based on the file's extension.

Cheers,
NC
Received on Tue Feb 7 21:07:58 2006