Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
muyangye committed Jan 21, 2024
1 parent 50a27ad commit f1684a9
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
Expand Down Expand Up @@ -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 => {},
Expand Down Expand Up @@ -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();
}

Expand Down

0 comments on commit f1684a9

Please sign in to comment.