Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   struts file upload limit (http://www.velocityreviews.com/forums/t136062-struts-file-upload-limit.html)

perkal 08-13-2004 04:03 AM

struts file upload limit
 
Hi all,

I have a file upload form which uses the struts <html:file>



perkal 08-13-2004 04:09 AM

Re: struts file upload limit
 
[sorry, I accidently hit the SEND button while typing, here's the message]

I have a file upload form which uses the struts. Does anyone know how to
specify a limit for the size of the file which is uploaded? (Let's say 2MB
is the maximum file size that could be uploaded.)

Do I have to calculate it from the ContentLength size from within the
ActionServlet?

Thanks in advance,
perkal

------------------------

"perkal" <per_j@hotmail.com> wrote in message
news:2o2sv1F5uf48U1@uni-berlin.de...
> Hi all,
>
> I have a file upload form which uses the struts <html:file>
>
>




Murray 08-13-2004 05:11 AM

Re: struts file upload limit
 

"perkal" <per_j@hotmail.com> wrote in message
news:2o2t97F63phtU1@uni-berlin.de...
> [sorry, I accidently hit the SEND button while typing, here's the message]
>
> I have a file upload form which uses the struts. Does anyone know how to
> specify a limit for the size of the file which is uploaded? (Let's say 2MB
> is the maximum file size that could be uploaded.)
>
> Do I have to calculate it from the ContentLength size from within the
> ActionServlet?
>
> Thanks in advance,
> perkal


In your struts.xml, specify a maxFileSize attribute on the controller
element

e.g. <controller processorClass="org.apache.struts.action.RequestPr ocessor"
maxFileSize="2M"/>

The size can be expressed as a number followed by a "K", "M", or "G", which
are interpreted to mean kilobytes, megabytes, or gigabytes, respectively. No
suffix is taken as bytes





All times are GMT. The time now is 01:53 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.