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
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to