Re: File upload

From: Date: Mon, 21 Jan 2002 17:04:38 +0000
Subject: Re: File upload
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-81395@lists.php.net to get a copy of this message
you could write a bit of JavaScript to run on the form's onSubmit event or even the fields onBlur event. Then in your JavaScript, parse out the file name and extension to validate. It's not 100% accurate since users could rename any file to have a JPG extension, but it works for the majority... At 06:41 PM 1/21/2002 +0200, val petruchek wrote:
How can I, using: <INPUT TYPE=\"FILE\" NAME=\"UPLOAD_FOTO\" SIZE=\"40\"> specify the file extension. I want the user only to upload *.jpg. You can only check $userfile_type to detect the type of uploaded file. You can specify nor extension to browse dialog neither default path for browsing... Security, you know Valentin Petruchek (aki Zliy Pes) http://zliypes.com.ua mailto:val@zliypes.com.ua -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.general (#81395) next »