fix: original ID parameter restored and attached to upload request payload
@@ -29,6 +29,7 @@ export class TechExtensionImportComponent implements OnInit {
response: Extension;
error: FileError;
importing = false;
+ id: string;
extensionId: string;
extensionName: string;
@@ -59,7 +60,7 @@ export class TechExtensionImportComponent implements OnInit {
header: 'Imported!',
message: 'Your technical extension has been imported'
});
- const id = this.extensionId || this.response.id;
+ const id = this.id || this.response.id;
this.router.navigate(['/customizations/tech-extensions', id], { relativeTo: this.route });
}).catch((reason: any) => {
this.error = {
@@ -70,13 +71,14 @@ export class TechExtensionImportComponent implements OnInit {
}
ngOnInit() {
+ this.id = this.route.snapshot.paramMap.get('id');
this.extensionId = this.route.snapshot.paramMap.get('extensionId');
this.extensionName = this.route.snapshot.queryParamMap.get('name');
if (!this.extensionName) {
// safety net
this.extensionId = undefined;
}
- const uploadUrl = this.extensionStore.getUploadUrl(this.extensionId);
+ const uploadUrl = this.extensionStore.getUploadUrl(this.id);
this.uploader = new FileUploader({
url: uploadUrl,
disableMultipart: false,
