Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Multiple File Input Fields in One Form

Sebastian Tschan edited this page Sep 6, 2020 · 4 revisions

The plugin can be applied to a form with multiple file input fields out of the box.
The files are sent to the server with the parameter name of the file input field selected by the user.

For example, you can could extend the demo code by adding the following snippet to the form:

<span class="btn btn-success fileinput-button">
  <i class="glyphicon glyphicon-plus"></i>
  <span>Add other files...</span>
  <input type="file" name="other_files[]" multiple />
</span>

Adjust the name attribute of your file input fields according to what is expected in your server-side handler.

Clone this wiki locally