diff --git a/src/main/webapp/app/lecture/lecture-attachments.component.ts b/src/main/webapp/app/lecture/lecture-attachments.component.ts index 9580b2c708a6..c49304e3bee7 100644 --- a/src/main/webapp/app/lecture/lecture-attachments.component.ts +++ b/src/main/webapp/app/lecture/lecture-attachments.component.ts @@ -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;