Sorry,
Cocoon 2.1.3
and this wiki page...
http://wiki.cocoondev.org/Wiki.jsp?page=FileUploadsWithFlow
1) request-factory should be ignored in 2.1, but get rid of it in case it was left in for compatibility and is screwing you up. The fact that you have it in implies that you are basing your understanding off a mix of 2.0 and 2.1 documents. Make sure you read the note at the top of http://wiki.cocoondev.org/Wiki.jsp?page=FileUploadsWithCocoon, ignore the rest of that page and follow the link to the 2.1 specific info.
2) Did you change web.xml in the src/webapps directory (wrong) or the build/webapps directory (right) or some other deployed directory (right)? There is also a build property in build.properties to set this automatically. You can run just the config changes by changing that setting (via local.build.properties - see INSTALL.txt) and just running build custom-conf. See http://wiki.cocoondev.org/Wiki.jsp?page=CustomConfigTarget.
3) Did you restart the servlet container after editing web.xml?
4) Did you say you were getting a HttpRequest? That brings up a change to the Request stored in the objectModel which may make that code on the wiki no longer work as written. Try this:
Request request = ObjectModelHelper.getRequest(obj);
Object o = request.get("blah");
if (o == null) {
// parameter missing from request
} else if (o instanceof Part) {
Part part = (Part) o;
// do something with it
} else if (o instanceof String) {
// upload is disabled - I think.
}Geoff
On Thu, 2004-02-05 at 16:35, Geoff Howard wrote:
Chris Wilder-Smith wrote:
Hi,
We're trying to use a multipart/form-data post to upload audio files recorded on the client machine to our cocoon-based backend. All of the web.xml file upload params seem to be set correctly:
request-factory=org.apache.cocoon.components.request.MultipartRequestFactoryImpl enable-uploads=true upload-directory=WEB-INF/work/upload-dir autosave-uploads=true overwrite-uploads=rename upload-max-size=10000000
According to the wiki pages, I should see the request type as MultipartHttpServletRequest when it comes through, but it is a regular cocoon HttpRequest. According to the example, this implies that uploads still aren't enabled.
I do see other parameters that come through on the request, it's picking up the correct generator, etc.
Which Cocoon version, which wiki page?
Geoff
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
