root 2 ヶ月 前
コミット
12ca29c45b
1 ファイル変更2 行追加2 行削除
  1. 2 2
      js/Common/awsupload.js

+ 2 - 2
js/Common/awsupload.js

@@ -151,7 +151,7 @@ async function awsuploadpart(filestate, file, uploadid, parts, key) {
     let len = Math.ceil(file.size / partsize); //循环的长度
     if (partarr.length) {
         filestate.status = "processing";
-        filestate.percent = parseInt((completeparts.length * 100) / count);
+        filestate.percent = parseInt((completeparts.length * 100) / len);
     }
     //循环上传
     for (let i = 0; i < len; i++) {
@@ -161,7 +161,7 @@ async function awsuploadpart(filestate, file, uploadid, parts, key) {
             uploadpart = await uploadPart(file, key, uploadid, i + 1, start, end);
             if (uploadpart.ETag != null) {
                 completeparts.push(uploadpart);
-                filestate.percent = parseInt((completeparts.length * 100) / count);
+                filestate.percent = parseInt((completeparts.length * 100) / len);
             }
 
             else {