You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Frank Russo <Fr...@sas.com> on 2010/01/05 22:58:42 UTC

RE: How is the max file size controlled for file uploads in Struts 1.3.8?

I guess the main problem is that the request params are gone. So not only if the file not submitted, but none of the params are submitted. The rest of the params need to be made available, imo...

----------------------------------------------------------------------------------------------------------------
Frank Russo
Developer ▪ Financial Services Division
SAS® … THE POWER TO KNOW®


-----Original Message-----
From: paulus.benedictus@gmail.com [mailto:paulus.benedictus@gmail.com] On Behalf Of Paul Benedict
Sent: Saturday, October 03, 2009 9:20 PM
To: Struts Users Mailing List
Subject: Re: How is the max file size controlled for file uploads in Struts 1.3.8?

Frank,

Do you prefer an exception? What would you do with it?

Paul

On Thu, Jul 9, 2009 at 8:17 AM, Frank Russo <Fr...@sas.com> wrote:
> org.apache.struts.util.RequestUtils has the following at lines 408-415:
>
>                Boolean maxLengthExceeded =
>                    (Boolean) request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED);
>
>                if ((maxLengthExceeded != null)
>                    && (maxLengthExceeded.booleanValue())) {
>                    ((ActionForm) bean).setMultipartRequestHandler(multipartHandler);
>                    return;
>                }
>
> Why would it just return? Shouldn't it throw some kind of exception? When my action is called, I have no way to know that the max file size was exceeded, and my request params are empty, so the correct DispatchAction method isn't being called.
>
> Has anyone else seen this behavior?
>
> ----------------------------------------------------------------------------------------------------------------
> Frank Russo
> Developer ▪ Financial Services Division
> SAS® … THE POWER TO KNOW®
>
>

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