NYCPHP Meetup

NYPHP.org

[nycphp-talk] Uploading file size issues

CED Consult at CovenantEDesign.com
Thu Jul 27 17:57:14 EDT 2006


Actually there is ONE HTML sided way...

Directly before the <input file/> tag, put an <input hidden/>

eg. <input type="hidden" name="MAX_FILE_SIZE" value="50000"/>

HTH,

Edward JS Prevost II
Me at EdwardPrevost.info
www.EdwardPrevost.info

----- Original Message ----- 
From: "Craig Thomas" <craig at juxtadigital.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Thursday, July 27, 2006 12:31 PM
Subject: Re: [nycphp-talk] Uploading file size issues


Corey Fogarty wrote:
> I use file uploaders often. Most recently I have been using it as a way
> for clients to upload Flash files as part of a database application. The
> .swf’s are usually 2-10mg and in some cases the browser sits and sits
> and apparently never really uploads the file. I looked all over for file
> size limitations on the type=file HTML form element but found nothing
> specific.

They don't exist. Even controlling the look of the browse button is a
pain. The type=file element has no ability to actually read info from
the hard drive of the client [which is right, security wise].  The file
is POSTED to the server and processed.

> Has anyone else experienced this? Is it a browser issue? Network speed
> issue? PHP issue? And if it is a known issue, is it better to fall back
> on FTP and a manual entry in the database?

PHP/Apache [web-server] issue.

Lots of settings can affect this, but these two [in the .php file]:

ini_set("memory_limit","20M");
ini_set("max_execution_time","60");

have solved the problem for me in the past [large jpgs].

In php.ini there is also a max_upload setting, and Apache can also limit
the upload size.

HTH,

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php






More information about the talk mailing list