From 6c52318f29d0f3ce2c77f30ed29eb3dea721db1c Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 28 Jul 2020 12:18:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E8=AF=81=E6=96=87=E4=BB=B6=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=9A=84=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/input/file.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/base/single/input/file.js b/src/base/single/input/file.js index eb55755c7..76b140658 100644 --- a/src/base/single/input/file.js +++ b/src/base/single/input/file.js @@ -103,6 +103,7 @@ // FireFox 3+, Safari 4 beta (Chrome 2 beta file is buggy and will not work) if (xhr.upload || xhr.sendAsBinary) { sendFile = function (handler, maxSize, width, height) { + var current = handler.current; if (-1 < maxSize && maxSize < handler.file.fileSize) { if (isFunction(handler.onerror)) { handler.onerror(); @@ -190,7 +191,7 @@ if (handler.file.type.indexOf("image") != -1) { attachO.attach_type = "image"; } - handler.attach_array.push(attachO); + handler.attach_array[current] = attachO; } else { upload["onerror"]({}); } @@ -211,7 +212,7 @@ handler.attach_array[0] = attachO; // handler.attach_array.push(attachO); } else { - handler.attach_array.push(attachO); + handler.attach_array[current] = attachO; } break; } @@ -238,6 +239,7 @@ // Internet Explorer, Opera, others else { sendFile = function (handler, maxSize, width, height) { + var current = handler.current; var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"), rpe = { loaded: 1, total: 100, simulation: true, interval: setInterval(function () { @@ -272,7 +274,7 @@ if (handler.maxlength == 1) { handler.attach_array[0] = attachO; } else { - handler.attach_array.push(attachO); + handler.attach_array[current] = attachO; } } catch (e) { if (isFunction(handler.onerror)) { @@ -645,4 +647,4 @@ BI.File.EVENT_PROGRESS = "EVENT_PROGRESS"; BI.File.EVENT_UPLOADED = "EVENT_UPLOADED"; BI.shortcut("bi.file", BI.File); -})(_global.document || {}); \ No newline at end of file +})(_global.document || {});