• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unable to upload more than 5MB

 
chandrakanth boga
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI ,

I need to upload product brochure file through ADMIN TOOL.
When i upload a file upto 4 MB it is working fine.
But when i upload more than 4.5 MB it is giving error in the page :--
------------------------------------------------------------------------
Error 500--Internal Server Error
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.
--------------------------------------------------------------------------
I tried to check the LOG FILES.It is not throwing any exception on the CONSOLE.
I checked the code.In the jsp it is calling a function to check the size of the file.The size limit is 500MB.So we can upload a file size upto 500MB.
But still it is not taking more than 5 MB.


Could any one help regarding the problem..............
 
dema rogatkin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's quite strange. I can upload over 4GB. Actually I met a silly error when I tried to upload more 4GB due int limitation but switching to long fixed the problem.
 
parra matta
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to use encoding of multipart/form-data instead of application/x-www-form-urlencoded.

multipart/form-data should be used to upload files.

There is not a built-in library of J2ee to support multipart/form-data, but there are many on the net. Try this one: http://servlets.com/cos/
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65129
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Autumn Sky",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic