cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@cocoon.apache.org
Subject [Cocoon Wiki] Updated: FileUploadsInCustomActions
Date Fri, 09 Jul 2004 08:11:42 GMT
   Date: 2004-07-09T01:11:42
   Editor: DavidCrossley <crossley@apache.org>
   Wiki: Cocoon Wiki
   Page: FileUploadsInCustomActions
   URL: http://wiki.apache.org/cocoon/FileUploadsInCustomActions

   delete junk attachment

Change Log:

------------------------------------------------------------------------------
@@ -1,24 +1,22 @@
 ''Note, this code is reportedly (GeoffHoward) '''wrong''', but I don't know what's wrong
with it.  This came from an earlier version of FileUploadsWithFlow.  I moved it to its own
page and added a link from [:FileUploadsWithCocoon2.1], because it had nothing to do with
flow. -- MarkLundquist
 ----
 If you have a custom sitemap component that you want to handle an upload request, you can
include the following Java code:
-{{{
-
-  import org.apache.cocoon.servlet.multipart.*;
-
-  ...
-
-  Request request = ObjectModelHelper.getRequest(obj);
-  if (request instanceof MultipartHttpServletRequest) {
-    Part part = (Part) request.get("upload-file");
-    if (part != null) {
-      // do something with it
-    } else {
-      // parameter not found
-    }
-  } else {
-    // upload is disabled
-  }
+{{{
+
+  import org.apache.cocoon.servlet.multipart.*;
+
+  ...
+
+  Request request = ObjectModelHelper.getRequest(obj);
+  if (request instanceof MultipartHttpServletRequest) {
+    Part part = (Part) request.get("upload-file");
+    if (part != null) {
+      // do something with it
+    } else {
+      // parameter not found
+    }
+  } else {
+    // upload is disabled
+  }
 }}}
-[[BR]]
-[[BR]]
-'''Attachment:''' attachment:plu [[BR]]
+

Mime
View raw message