Add addedfiles stream
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
dfefa6746f
commit
ebe435027f
@ -15,6 +15,7 @@ export class ResumableFileUploadService implements OnDestroy{
|
||||
public isMinimized = false;
|
||||
public parentCode: string;
|
||||
public refresh: Subject<any> = new Subject<any>();
|
||||
public addedFiles: Subject<File> = new Subject<File>();
|
||||
private _eventSub:Subscription;
|
||||
private initialized = false;
|
||||
|
||||
@ -54,8 +55,10 @@ export class ResumableFileUploadService implements OnDestroy{
|
||||
handleState(state:UploadState) {
|
||||
var file =this.files.find((f) => f.identifier == state.uploadId )
|
||||
if(state.status != "cancelled" && !file) {
|
||||
this.files.push(new File(state));
|
||||
let file = new File(state);
|
||||
this.files.push(file);
|
||||
this.isClosed=false;
|
||||
this.addedFiles.next(file)
|
||||
}
|
||||
switch(state.status) {
|
||||
case "uploading": {
|
||||
|
Loading…
Reference in New Issue
Block a user