Try to fix file count
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
15a09e4b05
commit
dc329a0e29
@ -52,23 +52,19 @@ export class ResumableFileUploadService implements OnDestroy{
|
||||
}
|
||||
|
||||
handleState(state:UploadState) {
|
||||
var file =this.files.find((f) => f.identifier == state.uploadId )
|
||||
if(!file) {
|
||||
this.files.push(new File(state));
|
||||
this.isClosed=false;
|
||||
}
|
||||
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;
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user