By the time you are checking the file size the whole stream has already been
read in by the MultipartServletRequestFilter. The default is to have
unlimited upload size. You can add configuration to change the limit.
I believe this will work, but I have not tested it.

public static void contributeApplicationDefaults(MappedConfiguration<String,
String> configuration)
{
  configuration.add(UploadSymbols.FILESIZE_MAX, 10000);
}
If you want to have a different max upload size per form, then I'd guess
you'd want to replace/supplement the MultiServletRequestFilter.

Josh


On Wed, Jul 16, 2008 at 3:58 AM, Martin Kersten <[EMAIL PROTECTED]>
wrote:

> Hi User-Group,
>
>   I expirence the following Problem:
>
> Using Tapestry + GWT I send a UploadRequest to a Tapestry Page.
> Once the Upload is processed the HTTP-Page containing 'OK' is
> returned, otherwise the Name of the Exception/Reason.
>
> On the server side the T5-page checks the size of the
> request-payload and response with a OversizedException. This
> exception is send to the client. This works very well with a
> single problem:
>
> Sending 300MB of Data the browser blocks until all 300MB are
> Transmitted but the page/server immediatly (used sysout to ensure)
> Rejects the transmittion by writing the OversizedException to
> response (MarkupWriter).
>
> I tried several things to stop the request upload from browser.
> I tried to open the content-input-stream of the request and
> Immediatly close this stream. With virtually no effect.
>
> Is there anyway to stop/break/destroy an request-upload of that
> size?
>
> Since all three major browsers (Opera, FireFox, IE) behave in the
> same way I guess the problem lies on Server-Side. So who is to blame
> for? Tapestry? (Dont think so), Tomcat?, Browsers?
>
> (In Short: You want to upload 300MB? I just read 10K and Say No To you!)
>
>
> Cheers,
>
> Martin (Kersten)
>
> PS: This is the Ajax way of doing things. The form (upload) is send to
> the server and the target of the response is an 'hidden' Iframe.
>
> PSS: If it is the browser I just would use the Upload Progress Listener-
> Mechanis I use to get the progress of the current upload.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

Reply via email to