commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Maujean" <nmauj...@hotmail.com>
Subject Re: [fileupload] simple question about the size we can transfer
Date Thu, 30 Dec 2004 19:44:09 GMT
yes, I just change the type of the requestSize then I put it in comment,

Nicolas Maujean

----- Original Message ----- 
From: "Dakota Jack" <dakota.jack@gmail.com>
To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
Sent: Thursday, December 30, 2004 6:21 PM
Subject: Re: [fileupload] simple question about the size we can transfer


> Pardon me!  Your code has a long but I looked at the actual code and
> it is an int.  Strange!
>
> Jack
>
>
> On Thu, 30 Dec 2004 09:20:37 -0800, Dakota Jack <dakota.jack@gmail.com>
wrote:
> > What are you talking about?  The requestSize is a long and not an int?
> >
> > Jack
> >
> >
> > On Thu, 30 Dec 2004 14:53:36 +0100, Nicolas Maujean
> > <nmaujean@hotmail.com> wrote:
> > > hi,
> > >
> > >   in FileUploadBase.java, I comment the code which get the size we
want to
> > > transfer :
> > >
> > > /*
> > >         long requestSize = req.getContentLength();
> > >
> > >         if (requestSize == -1)
> > >         {
> > >             throw new UnknownSizeException(
> > >                 "the request was rejected because it's size is
unknown");
> > >         }
> > >
> > >         if (sizeMax >= 0 && requestSize > sizeMax)
> > >         {
> > >             throw new SizeLimitExceededException(
> > >                 "the request was rejected because "
> > >                 + "it's size exceeds allowed range");
> > >         }
> > > */
> > >
> > >   because request.getContentLength return an int
> > > so we are limited to 2^31 - 1 =
> > > 2147483647 bytes
> > >   after I comment this part, is it possible to upload a file larger
than
> > > that size ?
> > > Note that the size is used only in this part of the code,
> > >
> > > thank you for your answer,
> > >
> > > Nicolas
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> > --
> > ------------------------------
> >
> > "You can lead a horse to water but you cannot make it float on its
back."
> >
> > ~Dakota Jack~
> >
> > "You can't wake a person who is pretending to be asleep."
> >
> > ~Native Proverb~
> >
> > "Each man is good in His sight. It is not necessary for eagles to be
crows."
> >
> > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> >
> > -----------------------------------------------
> >
> > "This message may contain confidential and/or privileged information.
> > If you are not the addressee or authorized to receive this for the
> > addressee, you must not use, copy, disclose, or take any action based
> > on this message or any information herein. If you have received this
> > message in error, please advise the sender immediately by reply e-mail
> > and delete this message. Thank you for your cooperation."
> >
>
>
> -- 
> ------------------------------
>
> "You can lead a horse to water but you cannot make it float on its back."
>
> ~Dakota Jack~
>
> "You can't wake a person who is pretending to be asleep."
>
> ~Native Proverb~
>
> "Each man is good in His sight. It is not necessary for eagles to be
crows."
>
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
>
> -----------------------------------------------
>
> "This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this for the
> addressee, you must not use, copy, disclose, or take any action based
> on this message or any information herein. If you have received this
> message in error, please advise the sender immediately by reply e-mail
> and delete this message. Thank you for your cooperation."
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message