You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by do...@cocoon.apache.org on 2004/11/15 15:45:33 UTC

[Cocoon Wiki] Updated: FileUploadsWithCocoon

   Date: 2004-11-15T06:45:33
   Editor: NicoVerwer <nv...@email.com>
   Wiki: Cocoon Wiki
   Page: FileUploadsWithCocoon
   URL: http://wiki.apache.org/cocoon/FileUploadsWithCocoon

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -5,7 +5,7 @@
 '''Overview'''[[BR]]
 When the Cocoon servlet receives a request, org.apache.cocoon.components.request.!MultipartRequestFactoryImpl (configurable) parses out the multipart data which comprises the file data, saves it to disk (configurable) in the upload directory (configurable) and places an [http://cocoon.apache.org/2.0/apidocs/org/apache/cocoon/components/request/multipart/FilePart.html org.apache.cocoon.components.request.multipart.FilePart] object in the request using the name of the multipart file parameter (the name of the <input type="file" ...> from the html).  This object provides access methods for later Cocoon steps to deal with the file.  It handles multiple files by saving them all to disk and placing multiple objects in the request.
 
-=== FilePart is abstract, but has two concrete subclasses: [http://cocoon.apache.org/2.0/apidocs/org/apache/cocoon/components/request/multipart/FilePartFile.html FilePartFile] and [http://cocoon.apache.org/2.0/apidocs/org/apache/cocoon/components/request/multipart/FilePartArray.html FilePartArray] which are the actual objects placed in the request as described above, depending on configuration options to be described below.  !FilePartFile is a file already saved to disk (as above) and provides an additional method getFile(), not defined in !FilePart, which returns the java.io.File object for the file on disk.  !FilePartArray holds the contents of the uploaded file in a byte array in memory which will not persist after the request is serviced unless otherwise acted upon. ===
+FilePart is abstract, but has two concrete subclasses: [http://cocoon.apache.org/2.0/apidocs/org/apache/cocoon/components/request/multipart/FilePartFile.html FilePartFile] and [http://cocoon.apache.org/2.0/apidocs/org/apache/cocoon/components/request/multipart/FilePartArray.html FilePartArray] which are the actual objects placed in the request as described above, depending on configuration options to be described below.  !FilePartFile is a file already saved to disk (as above) and provides an additional method getFile(), not defined in !FilePart, which returns the java.io.File object for the file on disk.  !FilePartArray holds the contents of the uploaded file in a byte array in memory which will not persist after the request is serviced unless otherwise acted upon.
 
 '''Configuration'''[[BR]]
 Unlike most configuration in Cocoon, all the options mentioned above are set in web.xml: