Re: Restricting mime type in file uploads?
| From: | Jason Wong | Date: | Wed, 07 Aug 2002 07:27:18 +0000 |
| Subject: | Re: Restricting mime type in file uploads? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-21036@lists.php.net to get a copy of this message | ||
On Wednesday 07 August 2002 15:19, Dave Carrera wrote:
> Hi All
> I have a working ap to allow clients to upload their images to a server
> & then I write the path to a MySql db for retrieval later.
> But I have been asked if we can control the mime type to only accept
> JPG's and nothing else.
>
> I can't seem to find the answer anywhere so I humbly ask for your help
> or guidance.
One method is to use getimagesize() on the uploaded file.
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Langsam's Laws:
(1) Everything depends.
(2) Nothing is always.
(3) Everything is sometimes.
*/