i am using this code for upload files to a server(in html):
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1"> <label>upload file<input type="file" name="file" id="file" /></label> <label><input type="submit" name="button" id="button" value="Submit" /></label></form>
It's open file browser and let me select a file,and when i press on Submit the file is sent to my server.
i wonder if there is a way to make multiple file select.
Tip: For <input type="file"> : To select multiple files, hold down the CTRL or SHIFT key while selecting.
Click the first file or folder you want to select. Hold down the Shift key, select the last file or folder, and then let go of the Shift key. Hold down the Ctrl key and click any other file(s) or folder(s) you would like to add to those already selected.
The multiple attribute is a boolean attribute. When present, it specifies that multiple options can be selected at once. Selecting multiple options vary in different operating systems and browsers: For windows: Hold down the control (ctrl) button to select multiple options.
You can use the multiple
attribute for that, like this:
<input type="file" multiple />
To select multiple files you need to press the Ctrl
key and click on the files you want to add.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With