This content has been marked as final.
Show 1 reply
-
1. Re: File Upload
vi_mahe_ka1 Apr 3, 2013 7:41 AM (in response to sincanvin)FileUpload requires two context-parameter's to be set in web.xml:
- createTempFiles boolean attribute which defines whether the uploaded files are stored in temporary files or available in the listener directly as byte[] data (false for this example).
- maxRequestSize attribute defines max size in bytes of the uploaded files (1000000 for this example).
Reference: http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=fileUpload&skin=blueSky
Alternate: on FileUploadEvent you can check the size of the file and show an error message if it is bigger than specified.