From bba702bd188f985c1d7b34f6cffa909cef91f39a Mon Sep 17 00:00:00 2001 From: Karson Date: Fri, 4 Jun 2021 15:21:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=86=E7=89=87=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/js/require-upload.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/public/assets/js/require-upload.js b/public/assets/js/require-upload.js index 650c593c..7dd26b29 100755 --- a/public/assets/js/require-upload.js +++ b/public/assets/js/require-upload.js @@ -252,11 +252,7 @@ define(['jquery', 'bootstrap', 'dropzone', 'template'], function ($, undefined, }, uploadprogress: function (file, progress, bytesSent) { if (file.upload.chunked) { - var totalBytesSent = 0; - file.upload.chunks.forEach(function (item) { - totalBytesSent += item.bytesSent; - }); - $(this.element).prop("disabled", true).html(" " + __('Upload') + Math.floor((totalBytesSent / file.size) * 100) + "%"); + $(this.element).prop("disabled", true).html(" " + __('Upload') + Math.floor((file.upload.bytesSent / file.size) * 100) + "%"); } }, totaluploadprogress: function (progress, bytesSent) {