Attempt to fix multiple queue events for file upload
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
94f973406e
commit
15a09e4b05
@ -54,8 +54,11 @@ export class ResumableFileUploadService implements OnDestroy{
|
|||||||
handleState(state:UploadState) {
|
handleState(state:UploadState) {
|
||||||
switch(state.status) {
|
switch(state.status) {
|
||||||
case "queue": {
|
case "queue": {
|
||||||
this.files.push(new File(state));
|
var file =this.files.find((f) => f.identifier == state.uploadId )
|
||||||
this.isClosed=false;
|
if(!file) {
|
||||||
|
this.files.push(new File(state));
|
||||||
|
this.isClosed=false;
|
||||||
|
}
|
||||||
};break;
|
};break;
|
||||||
case "uploading": {
|
case "uploading": {
|
||||||
this.isUploading = true;
|
this.isUploading = true;
|
||||||
@ -77,7 +80,7 @@ export class ResumableFileUploadService implements OnDestroy{
|
|||||||
var file =this.files.find((f) => f.identifier == state.uploadId )
|
var file =this.files.find((f) => f.identifier == state.uploadId )
|
||||||
if(file) {
|
if(file) {
|
||||||
file.error=true;
|
file.error=true;
|
||||||
file.errorMessage = state.response;
|
file.errorMessage = state.response as string;
|
||||||
}
|
}
|
||||||
};break;
|
};break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user