root 4 miesięcy temu
rodzic
commit
ae5d1d2cbd
1 zmienionych plików z 5 dodań i 2 usunięć
  1. 5 2
      js/Common/awsupload.js

+ 5 - 2
js/Common/awsupload.js

@@ -198,12 +198,14 @@ async function awsupload(file, folderid, filestate) {
                 //如果已经部分存在,那么直接在节点续传
                 if (uploadid) {
                     //断点续传
-                    return await awsuploadpart(filestate, file, uploadid, partsinfo.Parts, key);
+                    var data = await awsuploadpart(filestate, file, uploadid, partsinfo.Parts, key);
+                    return { data, uploadid };
                 }
                 //不存在,上传新的
                 else {
                     const uploadid = await initMultipartUpload(key, file); //初始化文件上传
-                    return await awsuploadpart(filestate, file, uploadid, [], key);
+                    var data = await awsuploadpart(filestate, file, uploadid, [], key);
+                    return { data, uploadid };
                 }
             }
             //如果已经上传成功了,那么直接返回状态百分百
@@ -211,6 +213,7 @@ async function awsupload(file, folderid, filestate) {
                 //data存在,上传成功
                 filestate.percent = 100;
                 filestate.status = "success";
+                return { data };
             }
         });
     }