diff --git a/apps/web/core/components/icons/attachment/attachment-icon.tsx b/apps/web/core/components/icons/attachment/attachment-icon.tsx
index 1ac6c2a033..9e4f369231 100644
--- a/apps/web/core/components/icons/attachment/attachment-icon.tsx
+++ b/apps/web/core/components/icons/attachment/attachment-icon.tsx
@@ -25,7 +25,7 @@ import {
} from "@/components/icons/attachment";
export const getFileIcon = (fileType: string, size: number = 28) => {
- switch (fileType) {
+ switch (fileType.toLowerCase()) {
case "pdf":
return ;
case "csv":
diff --git a/packages/services/src/file/helper.ts b/packages/services/src/file/helper.ts
index 8f3f5b8ee9..19635f06f4 100644
--- a/packages/services/src/file/helper.ts
+++ b/packages/services/src/file/helper.ts
@@ -114,6 +114,7 @@ const validateAndDetectFileType = async (file: File): Promise => {
const filenameError = validateFilename(file.name);
if (filenameError) {
console.warn(`File validation warning: ${filenameError}`);
+ return "";
}
try {