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

This commit is contained in:
Willem Dantuma 2020-07-20 14:13:30 +02:00
parent 94f973406e
commit 15a09e4b05

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;
}