Re: Checking File Size BEFORE Uploading
| From: | Monty | Date: | Mon, 14 Oct 2002 20:29:28 +0000 |
| Subject: | Re: Checking File Size BEFORE Uploading | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119949@lists.php.net to get a copy of this message | ||
Nicos, the problem is that MAX_FILE_SIZE doesn't check the file size before
it's uploaded to the server, it only works afterwards. So, you have to first
wait for the file to upload before you know whether or not it's too large.
Thanks.
> Hi,
>
> The way is :
> <form enctype="multipart/form-data" action="_URL_"
> method="post">
> <input type="hidden" name="MAX_FILE_SIZE" value="1000">
> Send this file: <input name="userfile" type="file">
> <input type="submit" value="Send File">
> </form>
> See the MAX_FILE_SIZE hidden BEFORE the userfile's type.
> See also: http://www.php.net/manual/sk/features.file-upload.php
>
> --
>
> Nicos - CHAILLAN Nicolas
> nicos@php.net