From 455562aa9027e695cca9d2701df545cb5dbdaf82 Mon Sep 17 00:00:00 2001 From: Willem Dantuma Date: Fri, 19 Jul 2019 10:01:39 +0200 Subject: [PATCH] Try to fix close issue --- .../resumable-file-upload.service.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/projects/common/src/lib/components/resumable-file-upload/resumable-file-upload.service.ts b/projects/common/src/lib/components/resumable-file-upload/resumable-file-upload.service.ts index 82de934..f2af8dd 100644 --- a/projects/common/src/lib/components/resumable-file-upload/resumable-file-upload.service.ts +++ b/projects/common/src/lib/components/resumable-file-upload/resumable-file-upload.service.ts @@ -40,10 +40,15 @@ export class ResumableFileUploadService implements OnDestroy{ updatetotalprogress() { var totalProgress =0; + var n=0; for(var i =0;i f.identifier == state.uploadId ) if(file) { file.progress = (state.progress?state.progress:0); - this.updatetotalprogress(); } };break; case "complete": { var file =this.files.find((f) => f.identifier == state.uploadId ) if(file) { file.progress = (state.progress?state.progress:0); - this.updatetotalprogress(); } file.success=true; };break; @@ -76,6 +79,7 @@ export class ResumableFileUploadService implements OnDestroy{ } };break; } + this.updatetotalprogress(); this.refresh.next({}); }