@@ -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 };
}
// 完成分块上传