commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Eugelink <t...@tbee.org>
Subject Re: FileUpoad:
Date Thu, 21 Apr 2005 08:12:55 GMT
Thanks Dakota,

The solution was very simple:

...

     	// we always want to be able to get the ID
     	// so we do the filesize check ourselves
         int lRequestSize = request.getContentLength();
     	lFileUpload.setSizeMax(lRequestSize);

...

  	lFileItems = lFileUpload.parseRequest(request);

...
	//
	// manually check the size
         if (iMaxSize >= 0 && lRequestSize > iMaxSize)
         {
     		response.sendRedirect(iOnError + "?id=" + lId);
     		return;
         }

Great help.

Tom

---------------------------------------------------------------------
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