0

I use following code to upload file to server. In jsp file, if I use :

 <input type="file" name="file" value="" />

It's work ok. But if I change to :

 <input type="file" id="fileinput" name="file"  multiple="multiple" />

to upload many file.It just upload the last file. How can I upload many file with this input tag.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
CodeMonster
  • 300
  • 5
  • 19
  • May this helps:- http://stackoverflow.com/questions/29602430/how-to-upload-multiple-images-into-folder-using-jsp-and-servlet/29606549#29606549 – Naman Jul 22 '15 at 09:06
  • This example only work with one file. I click select first file then select the second file and click upload. It just upload second file. – CodeMonster Jul 22 '15 at 09:53
  • It's completely working, Are you using `CTRL` to select multiple files. – Naman Jul 22 '15 at 10:28
  • It's work. I don't know about CTRL button. Thank you very much @NaMaN. But when end user use this feature, I must tell the them to press the CTRL button ? I don't think it's a good idea. Can u give some suggestions ? – CodeMonster Jul 22 '15 at 10:58
  • This sounds maybe embarrassing to you as "web developer", but the average computer and Internet user already knows that for long. It's exactly the same way of selecting multiple items in the average operating system platform (Windows, Linux, etc). – BalusC Jul 22 '15 at 11:02

0 Answers0