Hai Ben, Good that even you are working on Uploader components. Well the following piece of code needs to be attached to the each and every Input file or is it common to all the input files to be uploaded using Tapestry. In case If you can send some sample code. I will be very thankful to you.
Thanks, Manjith. -----Original Message----- From: Ben M. Dotte [mailto:[EMAIL PROTECTED] Sent: Monday, September 12, 2005 9:52 PM To: [email protected] Subject: Upload File Size Hi, I am attempting to limit the file size for an Upload component using Tapestry 4's new validation system. I wrote a custom validator that works except when the file being uploaded is bigger than the limit defined in MultipartDecoderImpl (10,000,000). When that limit is exceeded, I get an ugly error page "HTTP ERROR: 500". It appears that Tapestry attempts to upload the file before it even gets to my validator. Ideally, I would like to set maxSize in MultipartDecoderImpl to -1, which bypasses the commons FileUpload check and only uses my validator. In Tapestry 3 it was possible to do this in your .application file: <extension name="org.apache.tapestry.multipart-decoder" class="org.apache.tapestry.multipart.DefaultMultipartDecoder"> <configure property-name="maxSize" type="double" value="-1"/> </extension> So, my question is, what is the best way to do this in Tap4? Some thoughts: - Is Tapestry supposed to be uploading before validating the field (maybe this is a bug)? - MultipartDecoderImpl has maxSize set at 10,000,000 but no setter to change this like DefaultMultipartDecoder had? Many thanks for any thoughts/ideas! Ben Dotte --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
