diff --git a/demo/src/app/tab1/tab1.page.ts b/demo/src/app/tab1/tab1.page.ts index f7bf2966..3c311a08 100644 --- a/demo/src/app/tab1/tab1.page.ts +++ b/demo/src/app/tab1/tab1.page.ts @@ -18,6 +18,7 @@ declare const FileTransferManager: any; export class Tab1Page { uploader: any; + imagesIds: []; images: Map = new Map(); imageUris: Map = new Map(); uploadStates: Map = new Map(); @@ -145,14 +146,14 @@ export class Tab1Page { } onTapUploadButton() { - for (const id of this.uploadStates.keys()) { - if (!this.uploadStates.has(id)) { + for (const [key, value] of this.images) { + if (!this.uploadStates.has(key)) { // Start upload - this.uploadImage(id); + this.uploadImage(key); } else { // Remove download - const state = this.uploadStates.get(id); - this.uploader.removeUpload(id, (res) => { + const state = this.uploadStates.get(key); + this.uploader.removeUpload(key, (res) => { console.log('Remove result:', res); this.zone.run(() => { state.status = UploadStatus.Aborted;