aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src/app/feature-modules/blueprint/select-template
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/blueprint/select-template')
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts7
1 files changed, 5 insertions, 2 deletions
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<IBlueprintState>;
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 = <any>await zip.files[file].async('string');