v10 Advanced multiple file upload example that works?

UI Components for JSF
karlkras
Posts: 46
Joined: 26 Jan 2020, 01:54

26 May 2021, 15:54

Okay, as I guess it's not working as designed, I will file an issue.

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

26 May 2021, 16:31

worked fine for me today. please dont create a issue without a forked primefaces-test project.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

karlkras
Posts: 46
Joined: 26 Jan 2020, 01:54

26 May 2021, 18:37

tandraschko wrote:
26 May 2021, 16:31
worked fine for me today. please dont create a issue without a forked primefaces-test project.
well, hmmmm. So I loaded it back up this morning to give it another try and for some reason it decided to start working. :oops:
After spending hours yesterday unsuccessfully trying get some form of this to work with multiple files (auto, or otherwise) it seems to be working fine now.... very puzzling.

Thanks for listening. Maybe it was just your interaction that fixed it! :lol:

I will look at updating the example (adding some additional code comments to explain when and where the various items are applicable). This will at least give me some experience on how to work with the development process.

Quick question... does the update of the fileUpload instance get called on each single file uploaded?

karlkras
Posts: 46
Joined: 26 Jan 2020, 01:54

26 May 2021, 19:55

Nope, there's definitively a problem... events are getting missed, at least in auto mode.
Start my app, have a map I'm pushing the files coming into the handleFileUpload handler ( have code that will disable the fileupload control post files being uploaded, and have command button that will clear the list which allows me to once again select files again into the cleared map).
and as I cycle through it, I'm getting inaccurate responses (i.e., I select 7 files and 3 are reported back, select 3 files and 1 is reported) to the files that I've uploaded, and appears to deteriorate the longer I use it.
This would explain my findings from yesterday and why it appeared to have corrected itself.

Obviously not as straight forward to provide a test for this... but I'll do what I can to boil this down to a test case.

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

26 May 2021, 20:02

Yes please PrimeFaces Test reproducer is what we need to debug.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

karlkras
Posts: 46
Joined: 26 Jan 2020, 01:54

26 May 2021, 22:50

I forked it and added my demo code. Issue added to tracker. thanks!

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

27 May 2021, 02:01

I will debug in the morning. Thanks for the reproducer!
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

karlkras
Posts: 46
Joined: 26 Jan 2020, 01:54

07 Jun 2021, 00:51

To add even more intrigue to this problem, I've had to change to v10 of pf to get simple mode of multiple file upload working. It simply started failing calling the files setter (setFiles) in the bean on button submit. In fact, where it used to show <file1> +<n> files post file selection, this either stopped working entirely or sometimes only shows the first selected file name. But in either case it fails to submit any files.
It just stopped working in v8. Very odd.

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

07 Jun 2021, 14:04

Is it the same in all browsers? Firefox and Chrome etc? The reason I ask is Chrome 91 just came out and it did have some breaking changes so I am wondering if something broke especially if V8 stopped working.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

karlkras
Posts: 46
Joined: 26 Jan 2020, 01:54

07 Jun 2021, 14:42

I had only tried this under Chrome. I'll check the version and try it with Firefox later this morning.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 56 guests