diff --git a/apps/web/src/app/tools/import-export/import.component.html b/apps/web/src/app/tools/import-export/import.component.html index 26d820b5189..92441600cb6 100644 --- a/apps/web/src/app/tools/import-export/import.component.html +++ b/apps/web/src/app/tools/import-export/import.component.html @@ -291,11 +291,26 @@
+
+
+ + {{ this.fileSelected ? this.fileSelected.name : ("noFileChosen" | i18n) }} +
diff --git a/apps/web/src/app/tools/import-export/import.component.ts b/apps/web/src/app/tools/import-export/import.component.ts index f20b62517cb..3abaebe2bce 100644 --- a/apps/web/src/app/tools/import-export/import.component.ts +++ b/apps/web/src/app/tools/import-export/import.component.ts @@ -25,6 +25,7 @@ export class ImportComponent implements OnInit { importOptions: ImportOption[]; format: ImportType = null; fileContents: string; + fileSelected: File; formPromise: Promise; loading = false; importBlockedByPolicy = false; @@ -179,6 +180,11 @@ export class ImportComponent implements OnInit { }); } + setSelectedFile(event: Event) { + const fileInputEl = event.target; + this.fileSelected = fileInputEl.files.length > 0 ? fileInputEl.files[0] : null; + } + private async error(error: Error) { await Swal.fire({ heightAuto: false,