diff --git a/core/src/main/java/org/apache/struts2/dispatcher/multipart/AbstractMultiPartRequest.java b/core/src/main/java/org/apache/struts2/dispatcher/multipart/AbstractMultiPartRequest.java index a4616a0ca..e8806d370 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/multipart/AbstractMultiPartRequest.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/multipart/AbstractMultiPartRequest.java @@ -101,7 +101,7 @@ public abstract class AbstractMultiPartRequest implements MultiPartRequest { this.maxFiles = Long.parseLong(maxFiles); } - @Inject(StrutsConstants.STRUTS_MULTIPART_MAXFILESIZE) + @Inject(value = StrutsConstants.STRUTS_MULTIPART_MAXFILESIZE, required = false) public void setMaxFileSize(String maxFileSize) { this.maxFileSize = Long.parseLong(maxFileSize); } diff --git a/core/src/main/resources/org/apache/struts2/default.properties b/core/src/main/resources/org/apache/struts2/default.properties index 0b904f186..c516604bf 100644 --- a/core/src/main/resources/org/apache/struts2/default.properties +++ b/core/src/main/resources/org/apache/struts2/default.properties @@ -69,7 +69,7 @@ struts.multipart.parser=jakarta struts.multipart.saveDir= struts.multipart.maxSize=2097152 struts.multipart.maxFiles=256 -struts.multipart.maxFileSize=2097152 +# struts.multipart.maxFileSize= ### Load custom property files (does not override struts.properties!) # struts.custom.properties=application,org/apache/struts2/extension/custom