You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-dev@tcl.apache.org by Jason Brazile <ja...@netcetera.ch> on 2002/03/08 10:55:29 UTC
File Upload Question
While working on recent project, the customer asked me to please report
which versions of the popular browsers support file upload.
While investigating this, I ran across the following:
The main technical challenge of handling file uploads is that
it potentially involves sending more data to the CGI script
than the script can hold in main memory. For this reason CGI.pm
creates temporary files in either the /usr/tmp or the /tmp
directory. These temporary files have names like CGItemp125421,
and should be deleted automatically.
Does websh also do this? And if not, should it?
Jason
------------------------------------------------------------------------
Jason Brazile jason.brazile@netcetera.ch
Netcetera AG, 8040 Zuerich phone +41 1 247 70 70 fax +41 1 247 70 75
---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org
Re: File Upload Question
Posted by "David N. Welton" <da...@dedasys.com>.
Jason Brazile <ja...@netcetera.ch> writes:
> While working on recent project, the customer asked me to please
> report which versions of the popular browsers support file upload.
> While investigating this, I ran across the following:
> The main technical challenge of handling file uploads is that
> it potentially involves sending more data to the CGI script
> than the script can hold in main memory. For this reason
> CGI.pm creates temporary files in either the /usr/tmp or the
> /tmp directory. These temporary files have names like
> CGItemp125421, and should be deleted automatically.
> Does websh also do this? And if not, should it?
We use 'readAndDumpBody' from formdata.c, which does indeed grab and
dump chunks to a file, so it looks like we do the right thing in this
case.
File upload stuff is a mess, in my opinion. It's very difficult to
get right. PHP's recent security hole was file upload related, for
instance. If what we have now works, I'm averse to fiddle with it.
--
David N. Welton
Consulting: http://www.dedasys.com/
Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
Apache Tcl: http://tcl.apache.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org