From 70e4965f59583c41ac81a64cf76b60f4808fde7c Mon Sep 17 00:00:00 2001 From: "harshini.r" Date: Thu, 24 Feb 2022 13:02:42 +0530 Subject: [PATCH] Bug while editing a VNF/NS descriptor *Changed the content type to gzip in headers to support .gz files while editing VNF and NS descriptors. Change-Id: Ic9137f8f08048f0c8c3bb2dd4fe498c1f6eaecaf Signed-off-by: harshini.r --- src/app/utilities/edit-packages/EditPackagesComponent.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/utilities/edit-packages/EditPackagesComponent.ts b/src/app/utilities/edit-packages/EditPackagesComponent.ts index befafb8..87a0e6d 100644 --- a/src/app/utilities/edit-packages/EditPackagesComponent.ts +++ b/src/app/utilities/edit-packages/EditPackagesComponent.ts @@ -165,7 +165,7 @@ export class EditPackagesComponent implements OnInit { this.sharedService = this.injector.get(SharedService); } - /** Lifecyle Hooks the trigger before component is instantiate @public */ + /** Lifecyle Hooks the trigger before component is instantiated @public */ public ngOnInit(): void { this.headers = new HttpHeaders({ 'Content-Type': 'application/json', @@ -187,7 +187,7 @@ export class EditPackagesComponent implements OnInit { this.updateFileContentType = 'package_content'; this.navigatePath = 'vnf'; this.fileTypes = [{ value: 'text/x-yaml', viewValue: 'yaml' }, { value: 'text/json', viewValue: 'json' }]; - this.httpOptions = this.getHeadersWithContentAccept('application/zip', 'application/json'); + this.httpOptions = this.getHeadersWithContentAccept('application/gzip', 'application/json'); this.getEditFileData(); } else if (this.pacakgeType === 'netslice') { this.getUpdateURL = environment.NETWORKSLICETEMPLATE_URL; @@ -204,7 +204,7 @@ export class EditPackagesComponent implements OnInit { this.pacakgeType = 'nsd'; this.navigatePath = 'ns'; this.fileTypes = [{ value: 'text/x-yaml', viewValue: 'yaml' }, { value: 'text/json', viewValue: 'json' }]; - this.httpOptions = this.getHeadersWithContentAccept('application/zip', 'application/json'); + this.httpOptions = this.getHeadersWithContentAccept('application/gzip', 'application/json'); this.getEditFileData(); } } -- 2.17.1