简体   繁体   English

jQuery限制上传多个文件

[英]multiple file upload with jquery with limit

I am trying to find a solution with a multiple file upload with a limit. 我试图找到一个上传多个文件且有限制的解决方案。

I have created this fiddle to show what I have in mind. 我创建了这个小提琴来显示我的想法。

http://jsfiddle.net/8MzNs/ http://jsfiddle.net/8MzNs/

with the HTML inside my form 表单中的HTML

<ul id="file-list">
    <li class="file-box">Image 1</li>
    <li class="file-box">Image 2</li>
    <li class="file-box">Image 3</li>
    <li class="file-box">Image 4</li>
    <li class="file-box">Image 5</li>
</ul>

instead of: 代替:

<input type="file" name="file-1" />
<input type="file" name="file-2" />
<input type="file" name="file-3" />
<input type="file" name="file-4" />
<input type="file" name="file-5" />

But I cannot find a solution with a limit like this. 但是我找不到像这样的限制的解决方案。 But I might have missed it. 但是我可能已经错过了。

我已经安装了可以完美运行的Uploadify,然后我将添加一个小脚本(jQuery / PHP),该脚本将在添加图像时显示它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM