wbstr / vaadin-multifileupload

12 stars 23 forks source link

Unable to stop multiupload if user try to upload more number of files than setMaxFileCount(). #72

Open manikantkr opened 5 years ago

manikantkr commented 5 years ago

Hi,

We are facing an issue in MultiUpload, our requirement is to stop all upload if a user tries more number of files than setMaxFileCount().

Ex:- If we set maxFileCount as 3 and user try to upload 5 files then the user gets a warning saying "the max limit is 3", but it uploads 3 files successfully. How can we restrict all uploads if the count exceeds setMaxFileCount()?

After seeing the source code we found that in the changeVariables() method of MultiUpload.java, the configured number of files are added in newFiles List, even after the total count of the file is more than setMaxFileCount().