视频并发上传 || 失败重试

This commit is contained in:
xxx
2023-08-29 09:45:07 +08:00
parent beb5a011f5
commit 82e4ccece1
2 changed files with 16 additions and 27 deletions

View File

@@ -29,7 +29,7 @@ export class UploadChunk {
this.progress = 0;
this.isStop = false;
this.chunkIndex = 1;
this.chunkSize = 6 * 1024 * 1024;
this.chunkSize = 5 * 1024 * 1024; //分块大小-5mb
this.chunkNumber = Math.ceil(file.size / this.chunkSize);
this.uploadId = uploadId;
@@ -100,6 +100,7 @@ export class UploadChunk {
retry() {
this.isStop = false;
this.uploadStatus = 0;
this.start();
this.onRetry && this.onRetry();
}