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 }}
+
+
0"
diff --git a/src/app/components/drag-drop/drag-drop.component.ts b/src/app/components/drag-drop/drag-drop.component.ts
index a014f24..e370fe3 100644
--- a/src/app/components/drag-drop/drag-drop.component.ts
+++ b/src/app/components/drag-drop/drag-drop.component.ts
@@ -15,6 +15,7 @@ import {
})
export class DragDropComponent implements OnChanges {
@Input() initialFiles: string[] = [];
+ @Input() errorMessage: string = '';
fileNames: string[] = [];
@Output() filesSelected = new EventEmitter();
@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 {