@@ -610,14 +610,14 @@ public Map<String, String[]> parse(InputStream body) {
610610 // ----------------------------------------------------------- Data members
611611 /**
612612 * The maximum size permitted for the complete request, as opposed to
613- * {@link #fileSizeMax }. A value of -1 indicates no maximum.
613+ * {@link #maxFileSize }. A value of -1 indicates no maximum.
614614 */
615- private long sizeMax = - 1 ;
615+ private long maxRequestSize = Integer . parseInt ( Play . configuration . getProperty ( "upload.maxRequestSize" , "-1" )) ;
616616 /**
617617 * The maximum size permitted for a single uploaded file, as opposed to
618- * {@link #sizeMax }. A value of -1 indicates no maximum.
618+ * {@link #maxRequestSize }. A value of -1 indicates no maximum.
619619 */
620- private long fileSizeMax = - 1 ;
620+ private long maxFileSize = Integer . parseInt ( Play . configuration . getProperty ( "upload.maxFileSize" , "-1" )) ;
621621
622622 // ------------------------------------------------------ Protected methods
623623
@@ -865,8 +865,8 @@ private class FileItemStreamImpl implements FileItemStream {
865865 contentType = pContentType ;
866866 formField = pFormField ;
867867 InputStream istream = multi .newInputStream ();
868- if (fileSizeMax != -1 ) {
869- istream = new LimitedInputStream (istream , fileSizeMax ) {
868+ if (maxFileSize != -1 ) {
869+ istream = new LimitedInputStream (istream , maxFileSize ) {
870870
871871 @ Override
872872 protected void raiseError (long pSizeMax , long pCount ) throws IOException {
@@ -998,10 +998,10 @@ void close() throws IOException {
998998 throw new InvalidContentTypeException ("the request doesn't contain a " + MULTIPART_FORM_DATA + " or " + MULTIPART_MIXED + " stream, content type header is " + contentType );
999999 }
10001000
1001- if (sizeMax >= 0 ) {
1001+ if (maxRequestSize >= 0 ) {
10021002 // TODO check size
10031003
1004- input = new LimitedInputStream (input , sizeMax ) {
1004+ input = new LimitedInputStream (input , maxRequestSize ) {
10051005
10061006 @ Override
10071007 protected void raiseError (long pSizeMax , long pCount ) throws IOException {
0 commit comments