> Hi >> Do you get an error message? > No error message is obtained during the fileupoad. > In our application all request are mapped to the filter. We traced > our request for the case of fileupload through the jsp mentioned > above.The 2 different scenario for different file sizes are: > -> When the file size is less than 2gbIn this case our fleupload > is successful. On checking the request in the filter, the > ServletRequest.getContentLength() methodreturns the correct file > length size in bytes. > -> When the file size is greater than 2gb (2^32-1 bytes)In this > case our fleupload is not successful.The fileupload action cannot > proceed as per the logs and nothing else is thrown.On checking the > request in the filter the ServletRequest.getContentLength() method > returns 0 instead of the correct file length size in bytes.The > further mapping for the request hence does not proceed. > It is evident that there is problem with the servlet-api, that the > ServetRequest.getContentLength method returns a 32-bit int insteadof > a 64-bit long.This is why it fails for file sizes in bytes larger than 2gb. > What needs to be done in order to correctly read Content-Length > headers with numbers bigger than 2^32 - 1, so that it supports > uploadsgreater than 2gb. > > Thanks > > > Hi,> File upload in my struts application is not successful > for greater > than 2 gb. After previous discussion here on > previous thread, I > migrated my application to struts 2.3. > 24 as the only possible > solution in form of jakarta-stream > parser for large size uploads > (greater than 2gb).> But > after successfully migrating to struts 2.3.24 from 2.1.8, > file > upload greater than 2 gb still not supported. I want > to use jakarta-> streams for this purpose.Following is the code > snippet:> In struts.xml:<constant > name="struts.multipart.parser" > value="jakarta-stream" / > > <constant > > name="struts.multipart.maxSize" value="3147483648" />> jsp > file:<s:form id="uploadData" > action="abc_UploadAction" > namespace="xyz" > validateFields="false" method="post" > enctype="multipart/ > form-data">> > Alongwith with configuring > server.xml with maxPostSize e > lement and > mutipart-config in web.xml But still the file > upload request for > greater than 2 gb not > successful. > Thanks > > Do you get an error message?Log entries?Stack traces? > Please give us more detail about what is happening. > > regards,Christoph > This Email was scanned by Sophos Anti Virus > > > >
You might consider to upload files with AJAX instead of multipart form. That gives you the option to show a progress bar and thus better user experience. But of course it means you have to write and maintain more code. Here are samples: http://www.html5rocks.com/en/tutorials/file/dndfiles/ http://www.codeproject.com/Articles/685251/AJAX-file-uploader-with-progress-notification-in-p Regards, Christoph This Email was scanned by Sophos Anti Virus