You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Release 4.2 added support for per-file size limits — task #17792.
The new method is CommonsFileUploadSupport.setMaxUploadSizePerFile(long).
But this setting has no effect if file encoding does not match default encoding.
The reason is the following code in CommonsFileUploadSupport:
protectedFileUploadprepareFileUpload(Stringencoding) {
FileUploadfileUpload = getFileUpload();
FileUploadactualFileUpload = fileUpload;
// Use new temporary FileUpload instance if the request specifies// its own encoding that does not match the default encoding.if (encoding != null && !encoding.equals(fileUpload.getHeaderEncoding())) {
actualFileUpload = newFileUpload(getFileItemFactory());
actualFileUpload.setSizeMax(fileUpload.getSizeMax());
// !!missing: actualFileUpload.setFileSizeMax(fileUpload.getFileSizeMax());actualFileUpload.setHeaderEncoding(encoding);
}
returnactualFileUpload;
}
Uh oh!
There was an error while loading. Please reload this page.
Alex Shesterov opened SPR-13653 and commented
Release 4.2 added support for per-file size limits — task #17792.
The new method is
CommonsFileUploadSupport.setMaxUploadSizePerFile(long)
.But this setting has no effect if file encoding does not match default encoding.
The reason is the following code in
CommonsFileUploadSupport
:Affects: 4.2.2
Issue Links:
Referenced from: commits a1bf941
The text was updated successfully, but these errors were encountered: