1

I create a HtmlInputFile like this:

HtmlInputFile input = new HtmlInputFile();

Which gives me HTML output like this:

<input id="id..." name="name..." type="file">

I would like to add the "multiple" attribute to this file upload, so that I get this output:

<input id="id..." name="name..." type="file" multiple>

HtmlInputFile supports various HTML attributes, but it lacks support for multiple. Is there any way to add it?

Thank you very much!

1 Answers1

3

Try:

input.getPassThroughAttributes(true).put("multiple", "true");

See also:

Aritz
  • 30,971
  • 16
  • 136
  • 217