You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@apache.org> on 2001/02/21 23:31:55 UTC

[C2] Request For Vote: MultiPart Form Handling

I have a solution already developed that uses MaybeUpload
project.  The License is compatible with the Apache Software
License (BSD style), and the project is open source.

I would like to include the MaybeUpload jar file, and the
modifications to CocoonServlet and HttpRequest object files
that are required to seamlessly integrate this functionality.

Please note that I am planning on committing an Action that
will upload images to a database, as well as a Reader that
reads images from a database.  This is really cool stuff,
and it will _really_ help others out who want to do the same
kind of things.

Re: [C2] Request For Vote: MultiPart Form Handling

Posted by Berin Loritsch <bl...@apache.org>.
for the curious, the URL is here:

http://www.weft.co.uk/library/maybeupload/


----- Original Message ----- 
From: Berin Loritsch <bl...@apache.org>
To: <co...@xml.apache.org>
Sent: Wednesday, February 21, 2001 5:31 PM
Subject: [C2] Request For Vote: MultiPart Form Handling


> I have a solution already developed that uses MaybeUpload
> project.  The License is compatible with the Apache Software
> License (BSD style), and the project is open source.
> 
> I would like to include the MaybeUpload jar file, and the
> modifications to CocoonServlet and HttpRequest object files
> that are required to seamlessly integrate this functionality.
> 
> Please note that I am planning on committing an Action that
> will upload images to a database, as well as a Reader that
> reads images from a database.  This is really cool stuff,
> and it will _really_ help others out who want to do the same
> kind of things.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [C2] Request For Vote: MultiPart Form Handling

Posted by Berin Loritsch <bl...@apache.org>.
Tagunov Anthony wrote:
> 
> On Thu, 22 Feb 2001 08:57:25 -0500, Berin Loritsch wrote:
> 
> >Given that there were no objections, and a few enthusiastic
> >"that would be cool" responses..
> 
> Sorry for posting this late and claiming i'm not a voter, still one
> opinion: do these changes allow to get just binary data,
> without storing anything to disk?
> 
> In our projects we need to handle uploaded data exclusively
> ourselves, no standard package can do the uploading we need
> (eventually we store it to a DB, but first our processing should
> come)
> 
> And storing to disk in our case i consider EXTREMELY HARMFULL--
> why store to files if it is possible to get raw data and handle it
> according to our preferrences.
> 
> So, again -- is this going to be possible?

Not yet.  I agree that storing to disk is harmful, so I included
the functionality to delete the File handle I have been passed
from the Request object when I am done with it.  That makes it
ephemeral storage--however the best approach would be to keep it
in memory.

The issue is when you have several clients accessing the server
and uploading 512k files at the same time, you can bring the
server to its knees by keeping everything in memory.  Just something
to think about.  Although if you have unlimitted hardware budgets,
then memmory is definitely the way to go.

> 
> Best regards, Tagunov Anthony
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

Re: [C2] Request For Vote: MultiPart Form Handling

Posted by Tagunov Anthony <at...@nnt.ru>.
On Thu, 22 Feb 2001 08:57:25 -0500, Berin Loritsch wrote:

>Given that there were no objections, and a few enthusiastic
>"that would be cool" responses..

Sorry for posting this late and claiming i'm not a voter, still one
opinion: do these changes allow to get just binary data,
without storing anything to disk?

In our projects we need to handle uploaded data exclusively 
ourselves, no standard package can do the uploading we need
(eventually we store it to a DB, but first our processing should
come)

And storing to disk in our case i consider EXTREMELY HARMFULL--
why store to files if it is possible to get raw data and handle it
according to our preferrences.

So, again -- is this going to be possible?

Best regards, Tagunov Anthony



Re: [C2] Request For Vote: MultiPart Form Handling

Posted by Berin Loritsch <bl...@apache.org>.
Given that there were no objections, and a few enthusiastic
"that would be cool" responses, I am going to commit the
changes that I have--which do not affect normal opperation
until we use the multipart/form-data mime type with a submitted
form.

We can fine-tune the standard interfaces of how we get to
the uploaded Files later--as they are easy modifications.
The alteration to choose whether to accept the Servlet
Container's Request object or wrap it with MaybeUpload's
request object is encapsulated in a method, so it allows
for an easy and centralized method of generalizing that
section as well.

Berin Loritsch wrote:
> 
> Donald Ball wrote:
> >
> > On Wed, 21 Feb 2001, Berin Loritsch wrote:
> >
> > > I have a solution already developed that uses MaybeUpload
> > > project.  The License is compatible with the Apache Software
> > > License (BSD style), and the project is open source.
> > >
> > > I would like to include the MaybeUpload jar file, and the
> > > modifications to CocoonServlet and HttpRequest object files
> > > that are required to seamlessly integrate this functionality.
> >
> > i have no strong objection, but why not make it optional like xt and such?
> 
> Well, how would you propose doing that?  The HttpRequest has to be
> modified to allow access to the Files that are uploaded.  We can
> use the MaybeUpload method called get() that returns an Object
> (Vector, File, or String).  Or we can use the O'Reilly methods
> which have getFile(name) and getFiles(name) which return a File
> object or an array of Files respectively.  That way you can use
> _any_ HttpRequestWrapper that handles the details.  The other
> obstacle is that each wrapper has a different constructor.
> 
> My idea is to commit what I have, and generalize it later.  It is
> going to be a real pain trying to keep my changes in sync with
> Cocoon if we take too long to deliberate--Plus I have a deadline.
> 
> The method of accessing the files can be changed at a later date
> if necessary.
> 
> Please note that the MaybeUploadRequestWrapper is _only_ used if
> the incomming request is multipart/form-data encoded.  Most of the
> time, you will never see the object in use.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

Re: [C2] Request For Vote: MultiPart Form Handling

Posted by Berin Loritsch <bl...@apache.org>.
Donald Ball wrote:
> 
> On Wed, 21 Feb 2001, Berin Loritsch wrote:
> 
> > I have a solution already developed that uses MaybeUpload
> > project.  The License is compatible with the Apache Software
> > License (BSD style), and the project is open source.
> >
> > I would like to include the MaybeUpload jar file, and the
> > modifications to CocoonServlet and HttpRequest object files
> > that are required to seamlessly integrate this functionality.
> 
> i have no strong objection, but why not make it optional like xt and such?

Well, how would you propose doing that?  The HttpRequest has to be
modified to allow access to the Files that are uploaded.  We can
use the MaybeUpload method called get() that returns an Object
(Vector, File, or String).  Or we can use the O'Reilly methods
which have getFile(name) and getFiles(name) which return a File
object or an array of Files respectively.  That way you can use
_any_ HttpRequestWrapper that handles the details.  The other
obstacle is that each wrapper has a different constructor.

My idea is to commit what I have, and generalize it later.  It is
going to be a real pain trying to keep my changes in sync with
Cocoon if we take too long to deliberate--Plus I have a deadline.

The method of accessing the files can be changed at a later date
if necessary.

Please note that the MaybeUploadRequestWrapper is _only_ used if
the incomming request is multipart/form-data encoded.  Most of the
time, you will never see the object in use.

Re: [C2] Request For Vote: MultiPart Form Handling

Posted by Donald Ball <ba...@webslingerZ.com>.
On Wed, 21 Feb 2001, Berin Loritsch wrote:

> I have a solution already developed that uses MaybeUpload
> project.  The License is compatible with the Apache Software
> License (BSD style), and the project is open source.
>
> I would like to include the MaybeUpload jar file, and the
> modifications to CocoonServlet and HttpRequest object files
> that are required to seamlessly integrate this functionality.

i have no strong objection, but why not make it optional like xt and such?

- donald