FileUpload sizeLimit Problem with PF 3.2 and IE 9

UI Components for JSF
Post Reply
gene
Posts: 6
Joined: 20 Jan 2011, 19:10

16 Mar 2012, 02:44

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

brownsca
Posts: 9
Joined: 20 Oct 2010, 19:20

07 May 2012, 20:32

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)

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

08 May 2012, 10:04

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).
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

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests