Daniel Rall wrote:
>
> [EMAIL PROTECTED] writes:
>
> > jvanzyl 01/05/13 17:29:48
> >
> > Modified: src/java/org/apache/turbine/util/upload FileItem.java
> > Log:
> > - adding convenience method to write() the contents of the uploaded
> > file to disk. instead of having to mess around now you just do
> > the following:
> >
> > FileItem fileItem = data.getParameters().getFileItem("file");
> > fileItem.write("/tmp/junk");
> >
> > returns a boolean so you can check to make sure the file
> > was actually written to disk.
>
> Are these FileItem objects getting held in memory until that call to
> write() happens? What if they're 50 MB, and 3 are uploaded at once?
> Give the lusers an inch, and they take a foot...
>
> If this is the case (I know nothing about Turbine's file upload), what
> do you guys say to an option to write uploads to disk immediately upon
> parsing from the HTTP request?
There is a threshold specified in the TR.props for the number of bytes
an upload can be before it will be stored on disk. So if you specifiy
a threshold of 0 then the file uploads will always be written to disk.
--
jvz.
Jason van Zyl
[EMAIL PROTECTED]
http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://jakarta.apache.org/commons
http://tambora.zenplex.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]