|
|
|
@ -401,7 +401,7 @@ export class AllFileComponent {
|
|
|
|
|
let fileSize = file.size || null //上传文件的总大小
|
|
|
|
|
let shardSize = 5 * 1024 * 1024 //5MB一个分片
|
|
|
|
|
this.uploadisLoading2 = true |
|
|
|
|
// this.uploadProgress2 = 0 + "/" + filesnum
|
|
|
|
|
this.uploadProgress2 = 0 + "/" + filesnum |
|
|
|
|
this.child.uploading(file) //子组件 当前文件正在上传
|
|
|
|
|
|
|
|
|
|
if (file && fileSize<=shardSize) { //上传文件<=5MB时
|
|
|
|
@ -412,9 +412,9 @@ export class AllFileComponent {
|
|
|
|
|
this.objectName2 = data.objectName |
|
|
|
|
this.filesTag2.push("data") |
|
|
|
|
|
|
|
|
|
// this.zone.run(() => {
|
|
|
|
|
// setTimeout(() => this.uploadProgress2 = this.filesTag2.length + "/" + filesnum, 0);
|
|
|
|
|
// });
|
|
|
|
|
this.zone.run(() => { |
|
|
|
|
setTimeout(() => this.uploadProgress2 = this.filesTag2.length + "/" + filesnum, 0); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
result("成功了") |
|
|
|
|
this.child.endUpload(file) //子组件 当前文件上传成功
|
|
|
|
@ -485,9 +485,9 @@ export class AllFileComponent {
|
|
|
|
|
this.http.post(`/api/CompleteMultipartUpload/drives/${this.objectName2}`,data,{params:paramsData}).subscribe(data=>{ |
|
|
|
|
|
|
|
|
|
this.filesTag2.push("data") |
|
|
|
|
// this.zone.run(() => {
|
|
|
|
|
// setTimeout(() => this.uploadProgress2 = this.filesTag2.length + "/" + filesnum, 0);
|
|
|
|
|
// });
|
|
|
|
|
this.zone.run(() => { |
|
|
|
|
setTimeout(() => this.uploadProgress2 = this.filesTag2.length + "/" + filesnum, 0); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result("成功了") |
|
|
|
|