Attempt to fix multiple queue events for file upload
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good Details

2022.01
Willem Dantuma 2020-07-20 14:13:30 +02:00
parent 94f973406e
commit 15a09e4b05
1 changed files with 152 additions and 149 deletions

View File

@ -54,8 +54,11 @@ export class ResumableFileUploadService implements OnDestroy{
handleState(state:UploadState) {
switch(state.status) {
case "queue": {
var file =this.files.find((f) => f.identifier == state.uploadId )
if(!file) {
this.files.push(new File(state));
this.isClosed=false;
}
};break;
case "uploading": {
this.isUploading = true;
@ -77,7 +80,7 @@ export class ResumableFileUploadService implements OnDestroy{
var file =this.files.find((f) => f.identifier == state.uploadId )
if(file) {
file.error=true;
file.errorMessage = state.response;
file.errorMessage = state.response as string;
}
};break;
}