开发者

File upload multi-select

开发者 https://www.devze.com 2023-01-20 04:51 出处:网络
I\'m not positive if this is even possible, but is there any way to enable a user to ctrl+click (ie, multi-select) files on a website?

I'm not positive if this is even possible, but is there any way to enable a user to ctrl+click (ie, multi-select) files on a website?

Screen shot o开发者_开发问答f what I would like to be able to do via an upload tool, taken from just my standard file explorer:

File upload multi-select

In case this is relevant, the back-end of the site is in C# and the front-end scripting is JS/jQuery.


HTML4/XHTML1's file upload element only allows for single file uploads. You can use Flash or a plugin to get the behavior you want. You could use JQuery to create a dynamic form that would allow multiple uploads but they'd still need to be selected individually.

If you're OK with only supporting HTML5-capable browsers, you can <input type="file" multiple="multiple> and get this behavior.

0

精彩评论

暂无评论...
验证码 换一张
取 消