Anurag

In Cocoon's default state it should already handle the uploads
transparently for you.
Cocoon has two RequestWrappers which handle all uploads and save the
files to a location which by default is (Assuming Tomcat)
<tomcat dir>/Work/Standalone/localhost/cocoon/cocoon-files/upload-dir
You can configure this directory in cocoon.xconf within your WEB-INF
directory.

To access the uploaded files you can retrieve the files through the
request.get(<file's name attribute>) which returns a FilePart object.
You can then use the FilePart object to get the InputStream or other
information.

This was rather rushed so please let me know if you'd like more
information.
You can also see the upload.xsp sample which allows shows you how to
access the upload-dir itself.

PS. The files which are saved during upload are not deleted, you might
want to make sure that all code which handles uploads cleans up
correctly.

Andrew

On Tue, 2002-06-04 at 11:07, manish wrote:
> Hello All,
>     How can I upload a file from browser to server using cocoon.
> I am using the following syntax...
> <form name = "test" ENCTYPE="multipart/form-data" >
> 
> please let me know how to include this tag on cocoon side to accept file
> type data
> 
> from
> anurag
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 
-- 
Andrew Timberlake
Digital Design Development
http://www.ddd.co.za
mailto:[EMAIL PROTECTED]
011 705 1737
082 415 8283

"If debugging is the process of removing bugs, 
then programming must be the process of putting them in."


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

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

Reply via email to