diff --git a/src/app/components/drag-drop/drag-drop.component.html b/src/app/components/drag-drop/drag-drop.component.html index 8c1d342..7193af6 100644 --- a/src/app/components/drag-drop/drag-drop.component.html +++ b/src/app/components/drag-drop/drag-drop.component.html @@ -39,6 +39,11 @@ /> + +
+ {{ errorMessage }} +
+
(); @Output() fileRemoved = new EventEmitter(); @@ -61,9 +62,8 @@ export class DragDropComponent implements OnChanges { } private updateFileNames(files: FileList): void { - for (let i = 0; i < files.length; i++) { - this.fileNames.push(files[i].name); - } + const newFileNames = Array.from(files).map(file => file.name); + this.fileNames = [...this.fileNames, ...newFileNames]; } removeFile(fileName: string, event: Event): void {