修改分片逻辑
This commit is contained in:
parent
290988a2e8
commit
46590b2af1
|
@ -205,7 +205,7 @@ export default {
|
||||||
if (currentRow) {
|
if (currentRow) {
|
||||||
// 当前上传进度归0
|
// 当前上传进度归0
|
||||||
currentRow.percentage = 0
|
currentRow.percentage = 0
|
||||||
const _20M = 20 * 1024 * 1024 //设置超大文件判断关闭分片
|
const _20M = 20 * 1024 * 1024 //设置超大文件判断关闭分片
|
||||||
if (file.size > _20M) { // 20M 以上分片上传
|
if (file.size > _20M) { // 20M 以上分片上传
|
||||||
this.uploadByPieces({ // 这里走分片上传逻辑
|
this.uploadByPieces({ // 这里走分片上传逻辑
|
||||||
file, // 文件信息
|
file, // 文件信息
|
||||||
|
@ -281,7 +281,8 @@ export default {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const res = await verifyFileExist({ fileMD5Value })
|
const res = await verifyFileExist({ fileMD5Value })
|
||||||
if (res.exist) { // 跳过文件验证逻辑
|
console.log(res);
|
||||||
|
if (res.result.exist) { // 跳过文件验证逻辑
|
||||||
currentRow.percentage = 100
|
currentRow.percentage = 100
|
||||||
currentRow.uploadStatus = 2
|
currentRow.uploadStatus = 2
|
||||||
currentRow.result = res
|
currentRow.result = res
|
||||||
|
|
Loading…
Reference in New Issue
Block a user