我在我的网站(asp.net)中使用了 plupload 图片上传插件,我修改了 plupload 插件以同时上传多张图片。
旧代码
function t() {
var x, y = 0, w;
if (this.state == g.STARTED) {
for (w = 0; w < u.length; w++) {
if (!x && u[w].status == g.QUEUED) {
x = u[w];
x.status = g.UPLOADING;
if (this.trigger("BeforeUpload", x)) {
this.trigger("UploadFile", x)
}
}
else {
y++
}
}
if (y == u.length) {
this.stop();
this.trigger("UploadComplete", u)
}
}
}
我已经修改if (!x && u[w].status == g.QUEUED) {
为if (u[w].status == g.QUEUED) {
(!x
从 if 条件中删除)并且它正在同时上传多个图像。