how to open file chooser that can choose multiple

2019-07-21 11:37发布

I want to be able to open a file chooser dialog, from which I will be able to choose more than one file from the same dircetory. Similarly to the behavior that 'add attachment to gmail' provides. Only I don't need to upload the files immediately through Ajax. the files that I chosed can be uploaded later when pressing on the submit button of that dialog.

The technologies that are available for me are:
html, javascript,, JQuery (only if it's really needed) JSP, java

Thanks

3条回答
Explosion°爆炸
2楼-- · 2019-07-21 11:49

You have a few options that I can thinnk of:

  • html5 <input type="file" multiple="multiple" /> (lots of examples out there)
  • Flash (swfupload is a standard here)
  • Silverlight
  • Java
查看更多
Rolldiameter
3楼-- · 2019-07-21 11:53

From previous research (and a quick Google search now), it appears that you can't do that solely with HTML/Javascript with one input selection. However, there are lots of Flash uploaders that will let you do this. But, since Flash is not one of your technologies listed, I'm not sure if you want to go that route...

查看更多
劳资没心,怎么记你
4楼-- · 2019-07-21 11:56

This is not possible with Internet Explorer. Firefox (and also chrome) implements a multi-file selector in HTML5.

You can checkout the following alternatives using JavaScript:

查看更多
登录 后发表回答