Cancel only not allready uploaded files
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good Details

2022.01
Willem Dantuma 2021-05-03 19:00:20 +02:00
parent 3504990708
commit 040b5b8c4d
1 changed files with 5 additions and 2 deletions

View File

@ -71,7 +71,7 @@ export class ResumableFileUploadService implements OnDestroy{
if(file) {
var parts = state.url.split("/");
file.itemCode = parts[parts.length-1];
file.progress = (state.progress?state.progress:0);
file.progress = (state.progress?state.progress:0);
file.success=true;
}
};break;
@ -109,7 +109,10 @@ export class ResumableFileUploadService implements OnDestroy{
};
doClose = function () {
this.uploadService.control({action:'cancelAll'});
var toCancel = this.files.filter((f) => !f.success);
toCancel.forEach(f => {
this.uploadService.control({action:'cancel',uploadId:f.identifier});
});
this.files = new Array<File>();
this.isClosed = true;
}