From f1684a9d442c689f24d7396d8b186fb044ab6172 Mon Sep 17 00:00:00 2001 From: muyangye Date: Sat, 20 Jan 2024 21:08:33 -0800 Subject: [PATCH] fix bug --- .../static-file-input/static-file-input.component.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/src/app/core-ui/static-properties/static-file-input/static-file-input.component.ts b/ui/src/app/core-ui/static-properties/static-file-input/static-file-input.component.ts index 1c48baed52..5b1288b38d 100644 --- a/ui/src/app/core-ui/static-properties/static-file-input/static-file-input.component.ts +++ b/ui/src/app/core-ui/static-properties/static-file-input/static-file-input.component.ts @@ -95,6 +95,7 @@ export class StaticFileInputComponent .subscribe(fm => { this.fileMetadata = fm; if (filenameToSelect) { + // console.log("here1"); this.selectedFile = this.fileMetadata.find( fmi => fmi.filename === filenameToSelect, ); @@ -152,12 +153,11 @@ export class StaticFileInputComponent (100 * event.loaded) / event.total, ); } else if (event instanceof HttpResponse) { - const internalFilename = - event.body.internalFilename; + const filename = event.body.filename; this.parentForm.controls[ this.fieldName - ].setValue(internalFilename); - this.fetchFileMetadata(internalFilename); + ].setValue(filename); + this.fetchFileMetadata(filename); } }, error => {}, @@ -185,7 +185,7 @@ export class StaticFileInputComponent onStatusChange(status: any) {} onValueChange(value: any) { - this.staticProperty.locationPath = value.internalFilename; + this.staticProperty.locationPath = value.filename; this.parentForm.updateValueAndValidity(); }