Skip to content

Commit

Permalink
Fix upload overwriting the attachment name on first upload
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-glombik committed Nov 28, 2024
1 parent 486e152 commit 738dd2b
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ export class LectureAttachmentsComponent implements OnDestroy {
this.attachmentFile.set(file);
this.attachmentToBeUpdatedOrCreated()!.link = file.name;

this.attachmentToBeUpdatedOrCreated()!.name = this.form.value.attachmentName ?? undefined;
if (!this.attachmentToBeUpdatedOrCreated()!.name) {
const derivedFileName = this.determineAttachmentNameBasedOnFileName(file.name);
this.attachmentToBeUpdatedOrCreated()!.name = derivedFileName;
Expand Down

0 comments on commit 738dd2b

Please sign in to comment.