How can I use the input type=”file”> to choose several files?
Asked by Mask
In HTML5 you can add the multiple attribute to select more than 1 file.
<input type="file" name="filefield" multiple="multiple">
Answered by ZippyV
HTML5 has an input type=”file” multiple name=”files” /> element (specification).
On the desktop, browser support is very excellent (albeit IE 9 and earlier aren’t supported), but it’s less so on mobile, presumably because it’s more difficult to implement appropriately depending on the platform and version.
Answered by sylbru
It should all look like this:
<form enctype='multipart/form-data' method='POST' action='submitFormTo.php'> <input type='file' name='files' multiple /> <button type='submit'>Submit</button> </form>
u have the enctype=’multipart/form-data’ attribute in your tag, or you can’t read the files on the server side after submission!
Answered by mark.inman
This jQuery plugin (jQuery File Upload Demo) accomplishes this without the need of flash in the following manner:
<input type='file' name='files' multiple />
Answered by DigitalDaigor
HTML5 allows you to do so right now.
On the file input, you essentially use the multiple attribute.
<input type='file' multiple>
Answered by Costa Michailidis
Post is based on https://stackoverflow.com/questions/1593225/how-to-select-multiple-files-with-input-type-file