Re: upload file
| From: | Stut | Date: | Sun, 04 Mar 2007 13:53:40 +0000 |
| Subject: | Re: upload file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-249797@lists.php.net to get a copy of this message | ||
Alain Roger wrote:
I would like in fact to make more precise my previous post. I would like in fact to restrict the file extension (and therefore the user possibility). My user should be able only to upload files with extension JPEG, BMP, GIF. How can i set those parameter ?You can't control that without using a client-side technology like Java or ActiveX. It may also be possible to use Javascript in the onsubmit event on the form to check the file extension. If I may make a suggestion... don't over-complicate it. Trust your users to do the right thing on their side, help them by providing instructions, and validate what they've sent you in case they don't read them. -Stut