Re: file-upload.errors
| From: | Marco Tabini | Date: | Tue, 18 Feb 2003 02:57:55 +0000 |
| Subject: | Re: file-upload.errors | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-135942@lists.php.net to get a copy of this message | ||
On Mon, 2003-02-17 at 21:44, Nate wrote:
> Does this mean the file was examined by the browser and it determined it was
> too large OR does it have to upload the file temporarily and then check to
> see if its too large?
>
> It sounds like browser would first examine the file before it gets uploaded,
> however, if I try to upload a 1mb file it takes noticably longer to produce
> an error than say a 501 byte file.
>
> Please anyone that can help me with this I would really appreciate it.
The browser *should* check but it doesn't. In fact, the limit that's
being exceeded is probably the one set in your php.ini configuration
file. In any case, it's generally a bad idea to trust the client with
performing any checks for anything other than the convenience of the
user, because it's very easy for a malicious user to send out a request
that contains completely arbitrary data ignoring completely all the
controls that are built into your HTML file.
Cheers,
Marco
--
----------------
php|architect - The Monthly Magazine for PHP Professionals
Come check us out on the web at http://www.phparch.com!