From 789d7aed42ec7ee9bff6e0f1b09c71696a53d26b Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Mon, 15 Apr 2019 15:03:52 +0530 Subject: Fixed issue ccsdk-1223 User was unable to add folde/file in the root level of the file-manegr. fixed this issue Issue-ID: CCSDK-1223 Change-Id: I6f9960d3d8545b364385cc235f9117a488a5cef1 Signed-off-by: Arundathi Patil --- .../select-template/search-template/search-template.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts') diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts index 36876233d..9c11f7684 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts +++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts @@ -42,7 +42,7 @@ export class SearchTemplateComponent implements OnInit { blueprintState: IBlueprintState; bpState: Observable; validfile: boolean = false; - + uploadedFileName: string; @ViewChild('fileInput') fileInput; result: string = ''; @@ -62,6 +62,7 @@ export class SearchTemplateComponent implements OnInit { fileChanged(e: any) { this.paths = []; this.file = e.target.files[0]; + this.uploadedFileName = (this.file.name.split('.'))[0]; this.zipFile.files = {}; this.zipFile.loadAsync(this.file) .then((zip) => { @@ -88,7 +89,9 @@ export class SearchTemplateComponent implements OnInit { this.paths = []; for (var file in zip.files) { this.fileObject = { - name: zip.files[file].name, + // nameForUIDisplay: this.uploadedFileName + '/' + zip.files[file].name, + // name: zip.files[file].name, + name: this.uploadedFileName + '/' + zip.files[file].name, data: '' }; const value = await zip.files[file].async('string'); -- cgit 1.2.3-korg