diff --git a/src/app/user-input/add-file/add-file.component.ts b/src/app/user-input/add-file/add-file.component.ts index a11a17d..d89d67d 100644 --- a/src/app/user-input/add-file/add-file.component.ts +++ b/src/app/user-input/add-file/add-file.component.ts @@ -51,11 +51,16 @@ export class AddFileComponent { const file = event.target.files[0]; const reader = new FileReader(); reader.readAsText(file); - - // read the content of the file + if (file.name.includes('(') || file.name.includes(')')) { + NotificationComponent.showNotification( + 'Error uploading file', + 'File name cannot contain "(" or ")"', + 5000, + true + ); + return; + } reader.onload = () => { - // convert it to base64 - this.apiService .uploadFile( file.name,