选择多个文件进行上传的网页 [英] Selecting Multiple Files for Upload in Web Page
问题描述
我建立一个文件上传网页,必须处理多个上传文件的能力。理想情况下,我想允许用户选择一个文件夹,并有网页枚举该文件夹的客户端文件,但我不认为这是可能没有一个浏览器插件。
I am building a file upload web page that has the capability to process multiple upload files. Ideally I would like to allow the user to select a folder and have the web page enumerate the files in the folder client-side, but I don't think that's possible without a browser plugin.
另外,将有可能以允许用户使用文件/打开对话框中选择多个文件Shift键单击,然后按住Ctrl键单击,并列举那些的?
要清楚,我不希望用户必须通过反复打开和关闭文件/打开对话框中分别指定每个文件。
To be clear, I don't want the user to have to specify each file individually by repeatedly opening and closing a File/Open dialog.
我不能使用Flash或任何其他类型的二进制插件,但jQuery是确定。我需要支持IE7 +,Firefox和Safari
I can't use Flash or any other type of binary plugin, but jQuery is OK. I need to support IE7+, Firefox and Safari.
推荐答案
我强烈建议你阅读的这篇文章通过的里克施特拉尔为
I strongly recommend reading this article by Rick Strahl
简短的回答 HTML5
<form method="post" enctype="multipart/form-data">
<label>Upload Images:</label>
<input type="file" multiple="multiple" name="File1" id="File1" accept="image/*" />
<hr />
<input type="submit" id="btnUpload" value="Upload Images" />
</form>
这篇关于选择多个文件进行上传的网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!