--- Oskar Casquero <[EMAIL PROTECTED]> wrote:
> And what can I do to disable cocoon's automatic file
> uploading? I want to
> send files to cocoon but not to save them in disk

you configure it in web.xml:
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=103676501932187&w=2

> And another question about
>
http://outerthought.net/wiki/Wiki.jsp?page=FileUploadWithAction
> I've seen
> that the example uses
> 
...

> FilePartFile filePartFile =
> (FilePartFile)request.get("uploadfile");
> 
> to get the FilePartFile object. If I change the
> second line in order to get
> a FilePartArray it doesn't work. Do you know any
> solution?

It is either a FilePartFile or FilePartArray already,
based on the setting in web.xml mentioned above.  They
both extend FilePart, so you can use polymorphism and
just do: 

 FilePart filePart =
 (FilePart)request.get("uploadfile");

 and then
 InputStream is = filePart.getInputStream();

Which will work regardless of the setting in web.xml. 
I have been planning on adding a third setting for
web.xml which will make the uploaded file on disk
temporary, removed at the end of the request - so the
polymorphic handling there is the better way to go
than relying on it being a FilePartArray from a 
forwards compatibility standpoint.

Geoff Howard

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to