Try to fix file count
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2020-07-20 14:50:00 +02:00
parent 15a09e4b05
commit dc329a0e29

View File

@ -52,23 +52,19 @@ 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;
switch(state.status) {
case "uploading": {
this.isUploading = true;
var file =this.files.find((f) => f.identifier == state.uploadId )
if(file) {
file.progress = (state.progress?state.progress:0);
}
};break;
case "complete": {
var file =this.files.find((f) => f.identifier == state.uploadId )
if(file) {
var parts = state.url.split("/");
file.itemCode = parts[parts.length-1];
@ -77,7 +73,6 @@ export class ResumableFileUploadService implements OnDestroy{
}
};break;
case "error": {
var file =this.files.find((f) => f.identifier == state.uploadId )
if(file) {
file.error=true;
file.errorMessage = state.response as string;