RE: [PHP-DB] Restricting mime type in file uploads?
| From: | Peter Lovatt | Date: | Wed, 07 Aug 2002 07:49:31 +0000 |
| Subject: | RE: [PHP-DB] Restricting mime type in file uploads? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-21037@lists.php.net to get a copy of this message | ||
I found a complete upload system, which works very well
http://tecfa.unige.ch/~radeff/info/php/fileupload/
You could either see how it works, or use it inplace of your code ,whichever
is better.
Peter
-----------------------------------------------
Excellence in internet and open source software
-----------------------------------------------
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
-----------------------------------------------
-----Original Message-----
From: Jason Wong [mailto:phplist@gremlins.com.hk]
Sent: 07 August 2002 08:27
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Restricting mime type in file uploads?
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.
*/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php