Board index JavaServer Faces General Multiple fileUpload components on one page do not work

Multiple fileUpload components on one page do not work

Components, Ajax Framework, Utilities and More.

Posts: 16422
Location: Cybertron

Not supported at the moment.
PrimeFaces Lead

andyba User avatar
Expert Member

Posts: 2394
Location: Steinfeld, near Bremen/Osnabrück, DE

A simple workaround for this is to have each fileupload in its own page and bind those into the main page using an iframe for each one.
It is a bit clunky but it worked for me.
PF 3.4.2, PF 3.5.10, PF 4.x (Elite versions), PF 5, Pf 5.1
Glassfish 4.1, Mojarra 2.x, under Java 7 and 8.
If you haven't read the forum rules read them now
My blog:
PrimeFaces Project

Posts: 71
will this issue be fixed soon? using t:inputFileUpload because I need more than one fileupload file per form (using inside tabs...)

Posts: 16422
Location: Cybertron

You can use multiple simple uploaders, limitation applies to advanced uploader. t:inputFileUpload is same as p:fileUpload mode="simple".

Multi advanced file upload is not in immediate roadmap.
PrimeFaces Lead

Posts: 23
Sorry to jump in here but I'm a little bit confused.

I understand that the original requirement appears to be to have multiple fileUpload components. Is this the real requirement or is it to be able to upload multiple files from one form?

<p:fileUpload fileUploadListener="#{fileUploadController.handleFileUpload}" 

achieve that?

Posts: 16422
Location: Cybertron

Case is having multiple advanced fileupload components in same form, sure you can upload multiple files in one form if you have one advanced uploader.
PrimeFaces Lead

Posts: 23
OK Sorry, I'll keep my nose out then :)

Just thought I'd ask the question just in case the original poster was unaware of the "multiple" functionality.

can we use the two p:fileupload tags for mode =simple in a same page


Return to General