root 4 månader sedan
förälder
incheckning
12ca29c45b
1 ändrade filer med 2 tillägg och 2 borttagningar
  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 {