sizeLimit attribute in p:fileUpload seems to be working fine in all the browsers except for IE 7, 8, 9.
When IE is used, no error message is displayed when choosing a file larger then defined in sizeLimit and the fileUploadListener is invoked.
Is it a defect?
The issue may be reproduced in the PrimeFaces showcase:
http://www.primefaces.org/showcase/ui/f ... Single.jsf
PrimeFaces-3.3-SNAPSHOT on Mojarra-2.1.4
FileUpload sizeLimit Problem with PF 3.2 and IE 9
I too am having problems with sizeLimit being ignored in IE. (PF 3.2 and IE8)
Also, since the upload gets past the fileSize, then it can blow out the ThresholdSize of the FileUploadFilter. When this happens, there is NO error message returned to the client to indicate that the upload failed. This happens in the showcase as well with IE and large (10mb) file.
Log shows:
SEVERE: Error in parsing fileupload request
and this:
May 7, 2012 6:14:02 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
java.io.IOException: Processing of multipart/form-data request failed. \tmpupload\upload_7ab0c6b8_137288202d3__8000_00000007.tmp (The system cannot find the path specified)
at org.primefaces.webapp.MultipartRequest.parseRequest(MultipartRequest.java:69)
at org.primefaces.webapp.MultipartRequest.<init>(MultipartRequest.java:51)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:158)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Unknown Source)
Also, since the upload gets past the fileSize, then it can blow out the ThresholdSize of the FileUploadFilter. When this happens, there is NO error message returned to the client to indicate that the upload failed. This happens in the showcase as well with IE and large (10mb) file.
Log shows:
SEVERE: Error in parsing fileupload request
and this:
May 7, 2012 6:14:02 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
java.io.IOException: Processing of multipart/form-data request failed. \tmpupload\upload_7ab0c6b8_137288202d3__8000_00000007.tmp (The system cannot find the path specified)
at org.primefaces.webapp.MultipartRequest.parseRequest(MultipartRequest.java:69)
at org.primefaces.webapp.MultipartRequest.<init>(MultipartRequest.java:51)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:158)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Unknown Source)
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
The problem here is that it that IE does not natively support AJAX file upload so you have to adapt and account for these weaknesses by doing one of 2 things.
1- checking for IE as the browser and if it is only use simple mode upload. You will need to do allowTypes and sizeLimit checking yourself in the action. I do it this way.
2- Or you can and should adapt your upload handler to do check allowTypes and sizeLimit for each file uploaded as a matter of course (I do this as well).
1- checking for IE as the browser and if it is only use simple mode upload. You will need to do allowTypes and sizeLimit checking yourself in the action. I do it this way.
2- Or you can and should adapt your upload handler to do check allowTypes and sizeLimit for each file uploaded as a matter of course (I do this as well).
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
-
- Information
-
Who is online
Users browsing this forum: No registered users and 20 guests