[
https://issues.apache.org/jira/browse/WICKET-7035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17703936#comment-17703936
]
ASF GitHub Bot commented on WICKET-7035:
----------------------------------------
martin-g commented on code in PR #561:
URL: https://github.com/apache/wicket/pull/561#discussion_r1145771449
##########
wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java:
##########
@@ -1866,6 +1904,29 @@ protected void onBeforeRender()
// clear multipart hint, it will be reevaluated by
#isMultiPart()
this.multiPart &= MULTIPART_HARD;
+ if (!fileCountMax.isPresent())
+ {
+ AtomicLong accumulator = new AtomicLong(0);
+ visitChildren(MultiFileUploadField.class, new
IVisitor<MultiFileUploadField, Void>()
Review Comment:
Another option is to visit the FileUploadFields first and if it does not
have `multiple` attribute then count it as `1`. It it has `multiple` then stop
and do nothing more.
> fileCountMax should be added to control the amount of files being uploaded
> --------------------------------------------------------------------------
>
> Key: WICKET-7035
> URL: https://issues.apache.org/jira/browse/WICKET-7035
> Project: Wicket
> Issue Type: Improvement
> Components: wicket-core
> Affects Versions: 9.12.0
> Reporter: Maxim Solodovnik
> Assignee: Maxim Solodovnik
> Priority: Major
> Fix For: 10.0.0, 9.13.0
>
>
> fileCountMax should be added to control the amount of files being uploaded
--
This message was sent by Atlassian Jira
(v8.20.10#820010)