Re: How reliable is mime type in $_FILES superglobal.
- From: splodge <splodge@xxxxxxxxxxxxx>
- Date: Mon, 30 Jan 2006 21:55:21 +0000
NC wrote:
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
Thank you for the reply. So, what would happen if i took a file named photo.jpg and changed its name to:
1. photo.xyz
2. photo.gif
Different types of files will require different types of processing so it is very important that I can work out what the file type is.
.
- References:
- Prev by Date: Re: Accessing PHP serialized data in C++
- Next by Date: Re: Which installer is better?
- Previous by thread: Re: How reliable is mime type in $_FILES superglobal.
- Next by thread: Re: How reliable is mime type in $_FILES superglobal.
- Index(es):
Relevant Pages
|