I am having same problem to upload a huge file, but when I tried in local using 
WSAD, it is able to upload and no error. But after I deploy to the server and 
run from there, then I have error "The page cannot be displayed." I don't get 
"UnknownSizeException" though. So this is not the apache file upload problem, 
but servlet limitation?
 
 
please advise. thanks!!

Howard Lin <[EMAIL PROTECTED]> wrote:
I assume you want to upload a large file of 3GB (giga-byte). Since the
maximum int value is about 2G (2147483647), the parsing of
Content-Length header may fail and return -1 if the value of header is
larger than 2G (I haven't checked source code to confirm this.) This
may be a limitation on the servlet API, since in the spec., it
specifies HttpServletRequest.getContentLength returns int, not long.
However, the http protocol allows any number larger than 0 for this
header. The work around may be parsing this header directly using
Long.parseLong in the FileUploadBase.

Howard


On Tue, 21 Dec 2004 22:22:04 +0100, Nicolas Maujean
wrote:
> Hi,
> 
> I am trying to upload a large file of about 3Go when I am doing it I have
> an UnknownSizeException. I discovered that it came from the FileUploadBase
> class in the method from the method
> public List /* FileItem */ parseRequest(HttpServletRequest req)
> 
> from this code :
> int requestSize = req.getContentLength();
> 
> if (requestSize == -1)
> {
> throw new UnknownSizeException(
> "the request was rejected because it's size is unknown");
> }
> 
> Is it possible to upload a file of any size ? if yes, why I can't upload
> this file of 3Go, why I have an UnknownSizeException ? if no, how I can
> bypass it to upload a file of 3Go ?
> 
> thank you for your answer,
> 
> Nicolas Maujean
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to