v10 Advanced multiple file upload example that works?
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
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
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
well, hmmmm. So I loaded it back up this morning to give it another try and for some reason it decided to start working.tandraschko wrote: ↑26 May 2021, 16:31worked fine for me today. please dont create a issue without a forked primefaces-test project.
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!
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?
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.
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.
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
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
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
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
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.
It just stopped working in v8. Very odd.
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
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 56 guests