primefaces
primefaces copied to clipboard
FileUpload (advanced): Multiple FileUpload - regressions when some files do not meet the limits
Describe the bug
Uploading following files
13.0.x
14.0.0
Regressions
- only one error is shown
- after one error no further files are processed
Related to refactorings done for 14.0.0 as part of https://github.com/primefaces/primefaces/issues/11001, https://github.com/primefaces/primefaces/issues/11043, https://github.com/primefaces/primefaces/issues/11044
Reproducer
https://primefaces.org/showcase/ui/file/upload/multiple.xhtml Select multiple files. Some within the size-limit. Some to big ones.
Did some analysis....
Why do we get only one validation-error?
And - once there is any validation error nothing is uploaded any more:
So IMO a good amount of refactorings is required to restore the behaviour we had up to 13.0.x. (Show a message for each file which does not meet´s the requirements. Allow to upload that part of files which meet the requirements.)
All of this is independent of (explicit) using CSV or using drag´n´drop - feature.
@tandraschko : I think we need at least your thoughts about this.
yeah, seems that the FileValidator would need to throw a array of msgs this is a bigger refactoring
for me the behavior that we only upload when all files are valid is ok, we should just show all messages
I´ll try to look at the one message per invalid file part. Maybe this is something we can fix for 14.0.x too. Let´s see.