[opencms-dev] FW: FW: Max File Upload Size.
Nick Porter
nick.porter at tradar.com
Wed Apr 11 15:20:53 CEST 2012
Okay, so I've been trawling through the OpenCMS source on a tip from the Tomcat users mailing list looking for the call to the apache commons FileUpload lib. Apparently when FileUpload is invoked it takes max size parameter and they suggested I check to see if it is being set. I believe I've found the code that calls FileUpload around line 536 in the CmsUploadBean.java file.
long maxFileSizeBytes = OpenCms.getWorkplaceManager().getFileBytesMaxUploadSize(getCmsObject());
I'm not a developer but that line suggests to me that there is a setting somewhere in the Workplace where the maximum size of file uploads is set.
Can anybody point me in the right direction of where I might find or set this parameter?
--
Tradar Limited is a limited company registered in England and Wales. Registered number: 3431380.
Registered office: 20-21 Jockey's Fields, London. WC1R 4BW
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Nick Porter
Sent: 10 April 2012 11:56
To: The OpenCms mailing list
Subject: Re: [opencms-dev] FW: FW: Max File Upload Size.
Alberto, thx for responding.
I have since been able to get going the Webkit web browser recommended by RĂ¼diger for testing, plus the latest versions of Chrome and Opera both of which should be able to handle uploads >4GB according to the link you supplied.
With all of these browsers I found that if I uploaded a file of 1.6GB it would hang at 99% and not complete. With files of 2GB I would see a negative percentage in the GWT-Upload progress dialog which would eventually error with;
==================
Unexpected upload exception occurred.
java.lang.NegativeArraySizeException
at org.apache.commons.fileupload.disk.DiskFileItem.get(DiskFileItem.java:339)
at org.opencms.ade.upload.CmsUploadBean.createResources(CmsUploadBean.java:240)
at org.opencms.ade.upload.CmsUploadBean.start(CmsUploadBean.java:186)
at org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.org_opencms_ade_upload.uploadAction_jsp._jspService(uploadAction_jsp.java:56)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:188)
at org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:163)
at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:612)
at org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:417)
at org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:167)
at org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:886)
at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:517)
at org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:1062)
at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1598)
at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:153)
at org.opencms.main.OpenCmsServlet.doPost(OpenCmsServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
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 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:636)
=========================================
I could be wrong but I personally believe I have now ruled out the browser as a cause of problem.
--
np
From: opencms-dev-bounces at opencms.org<mailto:opencms-dev-bounces at opencms.org> [mailto:opencms-dev-bounces at opencms.org]<mailto:[mailto:opencms-dev-bounces at opencms.org]> On Behalf Of Alberto Gallardo
Sent: 05 April 2012 12:42
To: The OpenCms mailing list
Subject: Re: [opencms-dev] FW: FW: Max File Upload Size.
One collegue of mine recently commented something about 2GB upload limit due to browser implementations... You are sure aware of these, but just in case:
http://help.globalscape.com/help/me3/maximum_file_size_for_browser_based_uploads.htm
http://www.motobit.com/help/scptutl/pa98.htm
Html 5 should solve this problem. I'm not sure if you are not facing this challenge.
Regards,
Alberto Gallardo
2012/4/5 Nick Porter <nick.porter at tradar.com<mailto:nick.porter at tradar.com>>
...and yes, at this point I believe the error is being generated by the Tomcat6 server although I'm no Java dev so I could be wrong here as I have nothing other than OpenCMS to test whether the Tomcat6 server can successfully process a >2GB upload. If I had something basic I could post a file to at least I'd be able to differentiate between the two.
--
Tradar Limited is a limited company registered in England and Wales. Registered number: 3431380.
Registered office: 20-21 Jockey's Fields, London. WC1R 4BW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20120411/8892f81f/attachment.htm>
More information about the opencms-dev
mailing list