File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed 
spring-web/src/main/java/org/springframework/web/multipart/commons Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ public FileUpload getFileUpload() {
100100	}
101101
102102	/** 
103- 	 * Set the maximum allowed size (in bytes) before uploads are refused . 
103+ 	 * Set the maximum allowed size (in bytes) before an upload gets rejected . 
104104	 * -1 indicates no limit (the default). 
105105	 * @param maxUploadSize the maximum upload size allowed 
106106	 * @see org.apache.commons.fileupload.FileUploadBase#setSizeMax 
@@ -109,6 +109,17 @@ public void setMaxUploadSize(long maxUploadSize) {
109109		this .fileUpload .setSizeMax (maxUploadSize );
110110	}
111111
112+ 	/** 
113+ 	 * Set the maximum allowed size (in bytes) for each individual file before 
114+ 	 * an upload gets rejected. -1 indicates no limit (the default). 
115+ 	 * @param maxUploadSizePerFile the maximum upload size per file 
116+ 	 * @since 4.2 
117+ 	 * @see org.apache.commons.fileupload.FileUploadBase#setFileSizeMax 
118+ 	 */ 
119+ 	public  void  setMaxUploadSizePerFile (long  maxUploadSizePerFile ) {
120+ 		this .fileUpload .setFileSizeMax (maxUploadSizePerFile );
121+ 	}
122+ 
112123	/** 
113124	 * Set the maximum allowed size (in bytes) before uploads are written to disk. 
114125	 * Uploaded files will still be received past this amount, but they will not be 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments