Re: File Upload size restriction ??--another question--urgent

2003-06-30 Thread Marc
Prashanth.S wrote:
Hi all,
Is there any limit on the size of the file to be uploaded when i use struts...
Iam using FormFile interface for struts upload...
Is  there  any limit on the size of the file that is being uploaded...Iam getting 
error when i am uploading large files even though iam not using any validations...
Waiting for reply
Thanking you
Prashanth
Don't know about the TomCat capacity with file-uploads, but you must 
define the upload-buffer size within the  Tag in your 
struts-config XML.

The Struts docu says:

'maxFileSize - The maximum size (in bytes) of a file to be accepted as a 
file upload. Can be expressed as a number followed by a "K", "M", or 
"G", which are interpreted to mean kilobytes, megabytes, or gigabytes, 
respectively. [250M] (optional)'

So if not set, the upload should be limited to 250 MBytes.

Regards

Markus



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


File Upload size restriction ??--another question--urgent

2003-06-30 Thread Prashanth.S
Hi all,
Is there any limit on the size of the file to be uploaded when i use struts...
Iam using FormFile interface for struts upload...
Is  there  any limit on the size of the file that is being uploaded...Iam getting 
error when i am uploading large files even though iam not using any validations...
Waiting for reply
Thanking you
Prashanth

Nicolas De Loof <[EMAIL PROTECTED]> wrote:
In fact I've got this strange behaviour :

- Form-bean is validated a first time. 
MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED is setted and an
ActionError is returned by validate().

- browser go on uploading for a long time ... (5 minutes for 10Mo upload on localhost)

- validate is called A SECOND TIME.
MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED is setted and an ActionError is 
returned by validate().

- browser show errors.


My code looks like Struts upload example. I certainly not understood something !

Nico.



> I'm using fileupload too and have difficulties to send errors about file size.
>
> Are you able to send an error message with this code ?
>
> In my application validate method returns errors (I can see it in logs) when file is 
> too large, but browser does'nt
> display error JSP (waintg ...). I thing it is waiting for the file to be uploaded or 
> something like this.
>
> I'm using tomcat 4.1.24 an IE 6 on Windows 2000.
>
> Nico.
>
>
> > Uups,
> >
> > found the answer in one of the strus-examples.
> >
> > Here it is for those who are interested.
> >
> > Regards
> >
> > Markus
> >
> >
> >
> >
> > /**
> > * Check to make sure the client hasn't exceeded the maximum
> > allowed upload size inside of this
> > * validate method.
> > */
> > public ActionErrors validate(ActionMapping mapping,
> > HttpServletRequest request)
> > {
> > ActionErrors errors = null;
> > //has the maximum length been exceeded?
> > Boolean maxLengthExceeded = (Boolean)
> >
> > request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED);
> > if ((maxLengthExceeded != null) &&
> > (maxLengthExceeded.booleanValue()))
> > {
> > errors = new ActionErrors();
> > errors.add(ERROR_PROPERTY_MAX_LENGTH_EXCEEDED, new
> > ActionError("maxLengthExceeded"));
> > }
> > return errors;
> >
> > }
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!