codecracker2014 commented on a change in pull request #22: Adding capability to 
take max upload size per request.Fileupload 1 3 1
URL: https://github.com/apache/commons-fileupload/pull/22#discussion_r326855027
 
 

 ##########
 File path: src/main/java/org/apache/commons/fileupload/FileUploadBase.java
 ##########
 @@ -206,6 +206,18 @@ public long getSizeMax() {
         return sizeMax;
     }
 
+    /**
+     * Gets allowed max size for current upload, subclasses can override this 
method
+     * to calculate allowed size per request
+     * @param ctx requestContext - provides information related to current 
upload request.
+     * @return max size allowed for current request
+     */
+    public long getSizeMaxForThisRequest(RequestContext ctx) {
+        return sizeMax;
 
 Review comment:
   ctx is to be used in subclasses of FileUploadBase, so that max allowed size 
can be calculated based on request attributes at runtime. It's an extension 
points to allow dynamic upload limit.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to