Skip to content

Commit

Permalink
fix: 修复多次上传的BUG (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lansongxx authored Mar 28, 2024
1 parent 24134c7 commit a3c683c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

* 收藏/取消收藏

* 修复多次上传的BUG

## 2024-03-27

### ✨ Features | 新功能
Expand Down
7 changes: 5 additions & 2 deletions src/utils/cos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ export const cosUploadFile = (file: any, md5: string, suffix: string, callback:
Body: file,
SliceSize: file.size,
onProgress: (progressData: any) => {
if (progressData.percent === 1) {
console.log(progressData.percent)
},
onFileFinish: function (err, data, options) { /* 非必须 */
if(!err) {
callback()
}
}
},
}, (err: any, data: any) => {
console.log(err || data);
})
Expand Down
2 changes: 1 addition & 1 deletion src/views/personal/drawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ const createFolder = () => {
md5: "",
fatherId: fatherId.value,
category: 1,
}
}
postCreateFile(data)
.then((res) => {
Expand Down
2 changes: 1 addition & 1 deletion src/views/personal/recycle-title.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<header class="recycle-header">
<div class="recycle-header-header">
<div>回收站</div>
<button>
<button>
<i class="iconfont icon-lajitong"></i>
清空回收站
</button>
Expand Down

0 comments on commit a3c683c

Please sign in to comment.