You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Davanum Srinivas <di...@yahoo.com> on 2002/02/24 12:30:31 UTC

replacement for maybeupload

Jeroen,

Have made some changes in the latest CVS of Cocoon2 to make it easy to plug-in your code. Please
take a look and submit a patch against the latest CVS. Feel free to suggest how to made the
RequestFactory mode flexible so that people can add/use their own "Upload" components. 

Thanks,
dims

> Hi,
> 
> This is a replacement for the maybeupload request wrapper which i needed for
> our project. Instead of directly writing files to the upload dir the files
> are kept in the request object and can be manually stored by an action.
> 
> Improvements:
> - More control over file attachments
> - Multiple upload dirs (configurable in sitemap)
> - One less optional package (i'd like the code to be put in the standard
> distro under the apache license).
> 
> The following files are added / changed:
> 
> org.apache.cocoon.environment.http
> - removed MaybeUpload wrapper
> - modified RequestWrapper2? to use new code
> 
> org.apache.cocoon.environment.http.multipart
> - the parser and helper classes
> 
> org.apache.cocoon.acting
> - added UploadAction
> 
> src/webapp:
> - modified sitemap.xmap to use upload action for upload example
> 
> src/webapp/docs/xsp/upload.xsp
> - modified to use upload action and removed code to list uploaded files
> (because the uploadDir constant no longer exists)
> 
> build.xml:
> - removed MaybeUpload stuff
> 
> I've tested the code using the upload example with:
> - Internet Explorer 6.0 (win 98)
> - Konqueror 2.2 (linux)
> - Mozilla 0.9.5 (linux)
> 
> I've also tested opera 5 (linux) but, although the code works, opera does not
> post the submit field and thus the action is not executed. (I've verified
> this using the database examples which also didn't work).
> 
> The patch is made against the 2.0.1 release and is divided into two parts:
> the source patch (multipart-src-patch) and the build.xml patch
> (multipart-build.xml-patch) which can both be applied using patch -p1 <
> multipart-*-patch in the cocoon 2.0.1 directory.
> 
> Jeroen ter Voorde


=====
Davanum Srinivas - http://jguru.com/dims/

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: replacement for maybeupload

Posted by Jeroen ter Voorde <j....@home.nl>.
Fine with me,

I have to make some changes to support Vadim's 600 MB uploads ;) and re-test
the whole thing but i think it will be ready tomorrow night.

Anyway, thanks for (trying to) getting the config changes integrated.

Jeroen

----- Original Message -----
From: "Davanum Srinivas" <di...@yahoo.com>
To: <co...@xml.apache.org>
Sent: Tuesday, February 26, 2002 1:39 PM
Subject: Re: replacement for maybeupload


> How about a trade? I will (try to!) do this as soon as we get your
component integrated.
>
> Please create a enhancement/patch request at Bugzilla
(http://nagoya.apache.org, make sure [PATCH]
> is on the subject line) and upload your new files.
>
> Thanks,
> dims
>
> --- Jeroen ter Voorde <j....@home.nl> wrote:
> > Thanks,
> >
> > Wouldn't it be nice though to make the upload component configurable in
> > cocoon.xconf (but i'm not sure
> > it belongs there because it's servlet specific...
> >
> > Anyway it could be configured like this:
> >
> > <upload-component
> >     class="org...components/upload/MultipartUpload">
> >     <max-upload-size>10000</max-upload-size>
> >     <write-to-disk>true</write-to-disk>
> >     <conflict-handling>rename</conflict-handling>
> >     <upload-dir>incoming</upload-dir>
> > </upload-component>
> >
> > Jeroen
> >
> > ----- Original Message -----
> > From: "Davanum Srinivas" <di...@yahoo.com>
> > To: <co...@xml.apache.org>
> > Cc: <ro...@voorde.antar>; <j....@home.nl>
> > Sent: Sunday, February 24, 2002 12:30 PM
> > Subject: replacement for maybeupload
> >
> >
> > > Jeroen,
> > >
> > > Have made some changes in the latest CVS of Cocoon2 to make it easy to
> > plug-in your code. Please
> > > take a look and submit a patch against the latest CVS. Feel free to
> > suggest how to made the
> > > RequestFactory mode flexible so that people can add/use their own
"Upload"
> > components.
> > >
> > > Thanks,
> > > dims
> > >
> > > > Hi,
> > > >
> > > > This is a replacement for the maybeupload request wrapper which i
needed
> > for
> > > > our project. Instead of directly writing files to the upload dir the
> > files
> > > > are kept in the request object and can be manually stored by an
action.
> > > >
> > > > Improvements:
> > > > - More control over file attachments
> > > > - Multiple upload dirs (configurable in sitemap)
> > > > - One less optional package (i'd like the code to be put in the
standard
> > > > distro under the apache license).
> > > >
> > > > The following files are added / changed:
> > > >
> > > > org.apache.cocoon.environment.http
> > > > - removed MaybeUpload wrapper
> > > > - modified RequestWrapper2? to use new code
> > > >
> > > > org.apache.cocoon.environment.http.multipart
> > > > - the parser and helper classes
> > > >
> > > > org.apache.cocoon.acting
> > > > - added UploadAction
> > > >
> > > > src/webapp:
> > > > - modified sitemap.xmap to use upload action for upload example
> > > >
> > > > src/webapp/docs/xsp/upload.xsp
> > > > - modified to use upload action and removed code to list uploaded
files
> > > > (because the uploadDir constant no longer exists)
> > > >
> > > > build.xml:
> > > > - removed MaybeUpload stuff
> > > >
> > > > I've tested the code using the upload example with:
> > > > - Internet Explorer 6.0 (win 98)
> > > > - Konqueror 2.2 (linux)
> > > > - Mozilla 0.9.5 (linux)
> > > >
> > > > I've also tested opera 5 (linux) but, although the code works, opera
> > does not
> > > > post the submit field and thus the action is not executed. (I've
> > verified
> > > > this using the database examples which also didn't work).
> > > >
> > > > The patch is made against the 2.0.1 release and is divided into two
> > parts:
> > > > the source patch (multipart-src-patch) and the build.xml patch
> > > > (multipart-build.xml-patch) which can both be applied using
patch -p1 <
> > > > multipart-*-patch in the cocoon 2.0.1 directory.
> > > >
> > > > Jeroen ter Voorde
> > >
> > >
> > > =====
> > > Davanum Srinivas - http://jguru.com/dims/
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Sports - Coverage of the 2002 Olympic Games
> > > http://sports.yahoo.com
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
>
>
> =====
> Davanum Srinivas - http://jguru.com/dims/
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: replacement for maybeupload

Posted by Davanum Srinivas <di...@yahoo.com>.
How about a trade? I will (try to!) do this as soon as we get your component integrated. 

Please create a enhancement/patch request at Bugzilla (http://nagoya.apache.org, make sure [PATCH]
is on the subject line) and upload your new files.

Thanks,
dims

--- Jeroen ter Voorde <j....@home.nl> wrote:
> Thanks,
> 
> Wouldn't it be nice though to make the upload component configurable in
> cocoon.xconf (but i'm not sure
> it belongs there because it's servlet specific...
> 
> Anyway it could be configured like this:
> 
> <upload-component
>     class="org...components/upload/MultipartUpload">
>     <max-upload-size>10000</max-upload-size>
>     <write-to-disk>true</write-to-disk>
>     <conflict-handling>rename</conflict-handling>
>     <upload-dir>incoming</upload-dir>
> </upload-component>
> 
> Jeroen
> 
> ----- Original Message -----
> From: "Davanum Srinivas" <di...@yahoo.com>
> To: <co...@xml.apache.org>
> Cc: <ro...@voorde.antar>; <j....@home.nl>
> Sent: Sunday, February 24, 2002 12:30 PM
> Subject: replacement for maybeupload
> 
> 
> > Jeroen,
> >
> > Have made some changes in the latest CVS of Cocoon2 to make it easy to
> plug-in your code. Please
> > take a look and submit a patch against the latest CVS. Feel free to
> suggest how to made the
> > RequestFactory mode flexible so that people can add/use their own "Upload"
> components.
> >
> > Thanks,
> > dims
> >
> > > Hi,
> > >
> > > This is a replacement for the maybeupload request wrapper which i needed
> for
> > > our project. Instead of directly writing files to the upload dir the
> files
> > > are kept in the request object and can be manually stored by an action.
> > >
> > > Improvements:
> > > - More control over file attachments
> > > - Multiple upload dirs (configurable in sitemap)
> > > - One less optional package (i'd like the code to be put in the standard
> > > distro under the apache license).
> > >
> > > The following files are added / changed:
> > >
> > > org.apache.cocoon.environment.http
> > > - removed MaybeUpload wrapper
> > > - modified RequestWrapper2? to use new code
> > >
> > > org.apache.cocoon.environment.http.multipart
> > > - the parser and helper classes
> > >
> > > org.apache.cocoon.acting
> > > - added UploadAction
> > >
> > > src/webapp:
> > > - modified sitemap.xmap to use upload action for upload example
> > >
> > > src/webapp/docs/xsp/upload.xsp
> > > - modified to use upload action and removed code to list uploaded files
> > > (because the uploadDir constant no longer exists)
> > >
> > > build.xml:
> > > - removed MaybeUpload stuff
> > >
> > > I've tested the code using the upload example with:
> > > - Internet Explorer 6.0 (win 98)
> > > - Konqueror 2.2 (linux)
> > > - Mozilla 0.9.5 (linux)
> > >
> > > I've also tested opera 5 (linux) but, although the code works, opera
> does not
> > > post the submit field and thus the action is not executed. (I've
> verified
> > > this using the database examples which also didn't work).
> > >
> > > The patch is made against the 2.0.1 release and is divided into two
> parts:
> > > the source patch (multipart-src-patch) and the build.xml patch
> > > (multipart-build.xml-patch) which can both be applied using patch -p1 <
> > > multipart-*-patch in the cocoon 2.0.1 directory.
> > >
> > > Jeroen ter Voorde
> >
> >
> > =====
> > Davanum Srinivas - http://jguru.com/dims/
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Sports - Coverage of the 2002 Olympic Games
> > http://sports.yahoo.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


=====
Davanum Srinivas - http://jguru.com/dims/

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: replacement for maybeupload

Posted by Jeroen ter Voorde <j....@home.nl>.
Thanks,

Wouldn't it be nice though to make the upload component configurable in
cocoon.xconf (but i'm not sure
it belongs there because it's servlet specific...

Anyway it could be configured like this:

<upload-component
    class="org...components/upload/MultipartUpload">
    <max-upload-size>10000</max-upload-size>
    <write-to-disk>true</write-to-disk>
    <conflict-handling>rename</conflict-handling>
    <upload-dir>incoming</upload-dir>
</upload-component>

Jeroen

----- Original Message -----
From: "Davanum Srinivas" <di...@yahoo.com>
To: <co...@xml.apache.org>
Cc: <ro...@voorde.antar>; <j....@home.nl>
Sent: Sunday, February 24, 2002 12:30 PM
Subject: replacement for maybeupload


> Jeroen,
>
> Have made some changes in the latest CVS of Cocoon2 to make it easy to
plug-in your code. Please
> take a look and submit a patch against the latest CVS. Feel free to
suggest how to made the
> RequestFactory mode flexible so that people can add/use their own "Upload"
components.
>
> Thanks,
> dims
>
> > Hi,
> >
> > This is a replacement for the maybeupload request wrapper which i needed
for
> > our project. Instead of directly writing files to the upload dir the
files
> > are kept in the request object and can be manually stored by an action.
> >
> > Improvements:
> > - More control over file attachments
> > - Multiple upload dirs (configurable in sitemap)
> > - One less optional package (i'd like the code to be put in the standard
> > distro under the apache license).
> >
> > The following files are added / changed:
> >
> > org.apache.cocoon.environment.http
> > - removed MaybeUpload wrapper
> > - modified RequestWrapper2? to use new code
> >
> > org.apache.cocoon.environment.http.multipart
> > - the parser and helper classes
> >
> > org.apache.cocoon.acting
> > - added UploadAction
> >
> > src/webapp:
> > - modified sitemap.xmap to use upload action for upload example
> >
> > src/webapp/docs/xsp/upload.xsp
> > - modified to use upload action and removed code to list uploaded files
> > (because the uploadDir constant no longer exists)
> >
> > build.xml:
> > - removed MaybeUpload stuff
> >
> > I've tested the code using the upload example with:
> > - Internet Explorer 6.0 (win 98)
> > - Konqueror 2.2 (linux)
> > - Mozilla 0.9.5 (linux)
> >
> > I've also tested opera 5 (linux) but, although the code works, opera
does not
> > post the submit field and thus the action is not executed. (I've
verified
> > this using the database examples which also didn't work).
> >
> > The patch is made against the 2.0.1 release and is divided into two
parts:
> > the source patch (multipart-src-patch) and the build.xml patch
> > (multipart-build.xml-patch) which can both be applied using patch -p1 <
> > multipart-*-patch in the cocoon 2.0.1 directory.
> >
> > Jeroen ter Voorde
>
>
> =====
> Davanum Srinivas - http://jguru.com/dims/
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org