Re: [PHP] upload file size
From: Jason Wong (php-general_at_gremlins.biz)
Date: 11/16/03
- Previous message: Gareth Williams: "Re: [PHP] Moving to php"
- In reply to: Kirk Johnson: "RE: [PHP] upload file size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: php-general@lists.php.net Date: Sun, 16 Nov 2003 22:09:07 +0800
On Saturday 15 November 2003 02:40, Johnson, Kirk wrote:
> > this could really kill my bandwidth. is there a way to check
> > the file size
> > without fully uploading the file?
>
> Although it has been called an "urban legend" :), you could try the old
> MAX_FILE_SIZE trick.
I think you may be referring to my labelling of the MAX_FILE_SIZE thing as an
urban legend. But you're using it in the wrong context. What it was is that
some people reported having problems uploading files with PHP and that it
only worked when they added that MAX_FILE_SIZE tag. I countered that adding
the tag would only, potentially, *prevent* an upload -- in the (rare) case
that the browser supported it ...
> For this, add a hidden tag before the <input
> type="file"> tag:
>
> <input type="hidden" name="MAX_FILE_SIZE" value="(your $ of bytes here)">
>
> This is an instruction to the browser to restrict the size of files that it
> will attempt to upload, but browers are not required to honor it.
... I think that in my tests at that time, of the 'major' browsers, only Opera
supported the tag. But refer to the archives to be sure.
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* 3. ...and after I patched the microcode... --Top 100 things you don't want the sysadmin to say */
- Previous message: Gareth Williams: "Re: [PHP] Moving to php"
- In reply to: Kirk Johnson: "RE: [PHP] upload file size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|