How reliable is mime type in $_FILES superglobal.
- From: splodge <splodge@xxxxxxxxxxxxx>
- Date: Mon, 30 Jan 2006 21:05:38 +0000
This may seem like a stupid question but I want to check before I go ahead and build this...
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? Two reasons I want to know:
1. Certain types of files mustn't be uploaded, .exe files for example.
2. It is unsafe to rely on file extentions, not least because this portal will be exposed to Linux.
If the mime type is not reliable what techniques are available to discover the type of a file?
Many thanks. .
- Follow-Ups:
- Re: How reliable is mime type in $_FILES superglobal.
- From: Andy Hassall
- Re: How reliable is mime type in $_FILES superglobal.
- From: Colin McKinnon
- Re: How reliable is mime type in $_FILES superglobal.
- From: NC
- Re: How reliable is mime type in $_FILES superglobal.
- Prev by Date: Re: Washington DC Job Opportunity
- Next by Date: Re: Washington DC Job Opportunity
- Previous by thread: Accessing PHP serialized data in C++
- Next by thread: Re: How reliable is mime type in $_FILES superglobal.
- Index(es):
Relevant Pages
|