root 4 months ago
parent
commit
edb58f804e
1 changed files with 2 additions and 7 deletions
  1. 2 7
      js/Common/awsupload.js

+ 2 - 7
js/Common/awsupload.js

@@ -44,13 +44,8 @@ async function uploadPart(file, keyname, uploadid, pn, start, end) {
         "Access-Control-Allow-Credentials": "*",
         ACL: "public-read",
     };
-    const result = await bucket.uploadPart(params).promise()
-        .then((data) => {
-            return { ETag: result.ETag, PartNumber: pn };
-        })
-        .catch((err) => {
-            return err;
-        });
+    const result = await bucket.uploadPart(params).promise();
+    return { ETag: result.ETag, PartNumber: pn };
 }
 
 // 完成分块上传