lex 1 rok temu
rodzic
commit
214efa4b4a

+ 1 - 1
dev-dist/sw.js

@@ -82,7 +82,7 @@ define(['./workbox-5357ef54'], (function (workbox) { 'use strict';
     "revision": "3ca0b8505b4bec776b69afdba2768812"
   }, {
     "url": "index.html",
-    "revision": "0.hrh4hj1mvdo"
+    "revision": "0.bpeuttinbmg"
   }], {});
   workbox.cleanupOutdatedCaches();
   workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {

+ 6 - 6
src/helpers/oss-file-upload.ts

@@ -99,7 +99,7 @@ export const onFileUpload = ({
     const cos = new COS({
       // getAuthorization 必选参数
       getAuthorization: async (options, callback: any) => {
-        console.log(options, { Authorization: data.signature });
+        // console.log(options, { Authorization: data.signature });
         callback({ Authorization: data.signature });
       }
     });
@@ -112,17 +112,17 @@ export const onFileUpload = ({
         Key: `ktqy/${data.name}`,
         /* 存储在桶里的对象键(例如:1.jpg,a/b/test.txt,图片.jpg)支持中文,必须字段 */
         Body: data.file.file, // 上传文件对象
-        // SliceSize:
-        //   1024 *
-        //   1024 *
-        //   5 /* 触发分块上传的阈值,超过5MB使用分块上传,小于5MB使用简单上传。可自行设置,非必须 */,
+        SliceSize:
+          1024 *
+          1024 *
+          5 /* 触发分块上传的阈值,超过5MB使用分块上传,小于5MB使用简单上传。可自行设置,非必须 */,
         onProgress: function (progressData) {
           console.log(JSON.stringify(progressData));
         }
       })
       .then((res: any) => {
         console.log(res, 'res');
-        onFinish();
+        onFinish(res);
       })
       .catch(error => {
         console.log(error, 'error');

+ 1 - 0
src/views/natural-resources/components/my-resources/save-modal/index.tsx

@@ -183,6 +183,7 @@ export default defineComponent({
       onFinishAfter(options);
     };
     const onFinishAfter = async (options: any) => {
+      console.log(options, 'onFinishAfter');
       const item = state.find((c: any) => c.id == options.file.id);
       const url = ossUploadUrl + item.key;
       const type = formatUrlType(url);