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