primefaces icon indicating copy to clipboard operation
primefaces copied to clipboard

FileUpload (advanced): Multiple FileUpload - regressions when some files do not meet the limits

Open christophs78 opened this issue 9 months ago • 2 comments

Describe the bug

Uploading following files

image

13.0.x

image

14.0.0

image

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.

christophs78 avatar May 09 '24 10:05 christophs78

Did some analysis....

Why do we get only one validation-error? image

And - once there is any validation error nothing is uploaded any more: image

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.

christophs78 avatar May 11 '24 18:05 christophs78

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

tandraschko avatar May 11 '24 19:05 tandraschko

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.

christophs78 avatar May 18 '24 04:05 christophs78