Author: nbelaevski
Date: 2009-04-20 14:55:40 -0400 (Mon, 20 Apr 2009)
New Revision: 13710
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java
trunk/framework/impl/src/main/java/org/richfaces/component/FileUploadConstants.java
Log:
https://jira.jboss.org/jira/browse/RF-6877
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java 2009-04-20
18:39:55 UTC (rev 13709)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java 2009-04-20
18:55:40 UTC (rev 13710)
@@ -325,6 +325,9 @@
if (isMultipartRequest(httpRequest)) {
MultipartRequest multipartRequest = new MultipartRequest(httpRequest,
createTempFiles, maxRequestSize, uid);
+ Object oldAttributeValue =
httpRequest.getAttribute(FileUploadConstants.FILE_UPLOAD_REQUEST_ATTRIBUTE_NAME);
+ httpRequest.setAttribute(FileUploadConstants.FILE_UPLOAD_REQUEST_ATTRIBUTE_NAME,
multipartRequest);
+
try {
if (isFileSizeRestricted(request, maxRequestSize)) {
@@ -355,6 +358,7 @@
}
} finally {
+ httpRequest.setAttribute(FileUploadConstants.FILE_UPLOAD_REQUEST_ATTRIBUTE_NAME,
oldAttributeValue);
multipartRequest.clearRequestData();
}
} else {
Modified:
trunk/framework/impl/src/main/java/org/richfaces/component/FileUploadConstants.java
===================================================================
---
trunk/framework/impl/src/main/java/org/richfaces/component/FileUploadConstants.java 2009-04-20
18:39:55 UTC (rev 13709)
+++
trunk/framework/impl/src/main/java/org/richfaces/component/FileUploadConstants.java 2009-04-20
18:55:40 UTC (rev 13710)
@@ -21,6 +21,8 @@
package org.richfaces.component;
+import org.ajax4jsf.request.MultipartRequest;
+
/**
* @author Nick Belaevski
* @since 3.3.0
@@ -55,6 +57,8 @@
public static final String FILE_UPLOAD_ACTION_PROGRESS = "progress";
+ public static final String FILE_UPLOAD_REQUEST_ATTRIBUTE_NAME =
MultipartRequest.class.getName();
+
private FileUploadConstants() {
//private constructor
}