You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Will Glass-Husain <wg...@forio.com> on 2002/04/05 22:10:19 UTC
Re: [PATCH Fulcrum 1.0b] DefaultFileItem.java
Bartek/John,
In my code I made a version of FileItem.write that uses a FileOutputStream
instead of
a writer. This allows the user to upload a binary (e.g. GIF) file as well
as text.
May I propose that you modify DefaultFileItem to do this as well?
FileOutputStream fout = null;
try
{
fout = new FileOutputStream(file);
fout.write(FileItemObject.get());
}
finally
{
if (fout != null)
fout.close();
}
Best, Will Glass-Husain
> John McNally wrote:
> >
> > > Please test patches before sending them in. This will not compile.
It
> > also assumes text uploads and loads the entire file into memory. The
> > write method exists in order to not do these things.
> Sorry for my inattention. I promise the next patch(es) will be of higher
> quality.
> > But thanks for the idea, I have added related code to the version of
> > DefaultFileItem I am working on.
> >
> > john mcnally
> Bartek Walter
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: [PATCH Fulcrum 1.0b] DefaultFileItem.java
Posted by Will Glass-Husain <wg...@forio.com>.
cool! that was fast. and with credits. does that mean I'm now officially
a Jakarta developer? I think I'll stay on this list...
WGH
-----Original Message-----
From: jmcnally@localhost.localdomain
[mailto:jmcnally@localhost.localdomain]On Behalf Of John McNally
Sent: Friday, April 05, 2002 2:28 PM
To: Turbine Developers List
Subject: Re: [PATCH Fulcrum 1.0b] DefaultFileItem.java
Applied, thanks. Please note development of the file upload code has
moved to commons-sandbox/fileupload
<http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/fileupload/src/java/o
rg/apache/commons/fileupload/>
john mcnally
Will Glass-Husain wrote:
>
> Bartek/John,
>
> In my code I made a version of FileItem.write that uses a FileOutputStream
> instead of
> a writer. This allows the user to upload a binary (e.g. GIF) file as well
> as text.
> May I propose that you modify DefaultFileItem to do this as well?
>
> FileOutputStream fout = null;
> try
> {
> fout = new FileOutputStream(file);
> fout.write(FileItemObject.get());
> }
> finally
> {
> if (fout != null)
> fout.close();
> }
>
> Best, Will Glass-Husain
>
> > John McNally wrote:
> > >
> > > > Please test patches before sending them in. This will not compile.
> It
> > > also assumes text uploads and loads the entire file into memory. The
> > > write method exists in order to not do these things.
>
> > Sorry for my inattention. I promise the next patch(es) will be of higher
> > quality.
>
> > > But thanks for the idea, I have added related code to the version of
> > > DefaultFileItem I am working on.
> > >
> > > john mcnally
>
> > Bartek Walter
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [PATCH Fulcrum 1.0b] DefaultFileItem.java
Posted by John McNally <jm...@collab.net>.
Applied, thanks. Please note development of the file upload code has
moved to commons-sandbox/fileupload
<http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/fileupload/src/java/org/apache/commons/fileupload/>
john mcnally
Will Glass-Husain wrote:
>
> Bartek/John,
>
> In my code I made a version of FileItem.write that uses a FileOutputStream
> instead of
> a writer. This allows the user to upload a binary (e.g. GIF) file as well
> as text.
> May I propose that you modify DefaultFileItem to do this as well?
>
> FileOutputStream fout = null;
> try
> {
> fout = new FileOutputStream(file);
> fout.write(FileItemObject.get());
> }
> finally
> {
> if (fout != null)
> fout.close();
> }
>
> Best, Will Glass-Husain
>
> > John McNally wrote:
> > >
> > > > Please test patches before sending them in. This will not compile.
> It
> > > also assumes text uploads and loads the entire file into memory. The
> > > write method exists in order to not do these things.
>
> > Sorry for my inattention. I promise the next patch(es) will be of higher
> > quality.
>
> > > But thanks for the idea, I have added related code to the version of
> > > DefaultFileItem I am working on.
> > >
> > > john mcnally
>
> > Bartek Walter
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>