CommonsMultipartResolver allows for specifying max upload size per file
Issue: SPR-13200
This commit is contained in:
parent
f0c6bff82a
commit
23124d106b
|
|
@ -100,7 +100,7 @@ public abstract class CommonsFileUploadSupport {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the maximum allowed size (in bytes) before uploads are refused.
|
||||
* Set the maximum allowed size (in bytes) before an upload gets rejected.
|
||||
* -1 indicates no limit (the default).
|
||||
* @param maxUploadSize the maximum upload size allowed
|
||||
* @see org.apache.commons.fileupload.FileUploadBase#setSizeMax
|
||||
|
|
@ -109,6 +109,17 @@ public abstract class CommonsFileUploadSupport {
|
|||
this.fileUpload.setSizeMax(maxUploadSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the maximum allowed size (in bytes) for each individual file before
|
||||
* an upload gets rejected. -1 indicates no limit (the default).
|
||||
* @param maxUploadSizePerFile the maximum upload size per file
|
||||
* @since 4.2
|
||||
* @see org.apache.commons.fileupload.FileUploadBase#setFileSizeMax
|
||||
*/
|
||||
public void setMaxUploadSizePerFile(long maxUploadSizePerFile) {
|
||||
this.fileUpload.setFileSizeMax(maxUploadSizePerFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the maximum allowed size (in bytes) before uploads are written to disk.
|
||||
* Uploaded files will still be received past this amount, but they will not be
|
||||
|
|
|
|||
Loading…
Reference in New Issue