+ /** Drag and drop feature and fetchind the details of credential files @private */
+ public onFileSelected(event: Event): void {
+ const input = event.target as HTMLInputElement;
+ if (input && input.files && input.files.length > 0) {
+ const file: File = input.files[0];
+ const reader: FileReader = new FileReader();
+ reader.onload = (e: ProgressEvent<FileReader>) => {
+ const tomlContent = e.target?.result as string;
+ this.credentialsAs64 = btoa(tomlContent);
+ };
+ reader.readAsText(file);
+ }
+ this.fileInputcredsLabel.nativeElement.innerText = input.files[0].name;
+ this.fileInputcreds.nativeElement.value = null;
+ }
+