Skip to content

Commit

Permalink
fixed: 修复文件分片上传在已选择文件的情况下,再次选择并取消出现控制台飘红且原文件清空的bug (#1746)
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinchan22 committed May 18, 2024
1 parent 0fba597 commit 42de925
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web/src/view/example/breakpoint/breakpoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ const percentageFlage = ref(true)
// 选中文件的函数
const choseFile = async(e) => {
// 点击选择文件后取消 直接return
if (!e.target.files.length) {
return
}
const fileR = new FileReader() // 创建一个reader用来读取文件流
const fileInput = e.target.files[0] // 获取当前文件
const maxSize = 5 * 1024 * 1024
Expand Down

0 comments on commit 42de925

Please sign in to comment.