diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-drag-and-drop.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-drag-and-drop.tsx index b9f1e2635..7abc8d6e3 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-drag-and-drop.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-drag-and-drop.tsx @@ -4,7 +4,7 @@ import useAlertStore from "../../../../../../stores/alertStore"; const fsErrorText = "Please ensure your file has one of the following extensions:"; -const snErrorTxt = "png, jpg, jpeg, gif, bmp, webp"; +const snErrorTxt = "png, jpg, jpeg"; const useDragAndDrop = ( setIsDragging, @@ -49,7 +49,7 @@ const useDragAndDrop = ( const handleFiles = (files, setFiles, currentFlowId, setErrorData) => { if (files) { - const allowedExtensions = ["png", "jpg", "jpeg", "gif", "bmp", "webp"]; + const allowedExtensions = ["png", "jpg", "jpeg"]; const file = files?.[0]; const fileExtension = file.name.split(".").pop()?.toLowerCase(); if (!fileExtension || !allowedExtensions.includes(fileExtension)) { diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-handle-file-change.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-handle-file-change.tsx index 6e16587f2..796f99c75 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-handle-file-change.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-handle-file-change.tsx @@ -4,7 +4,7 @@ import useAlertStore from "../../../../../../stores/alertStore"; const fsErrorText = "Please ensure your file has one of the following extensions:"; -const snErrorTxt = "png, jpg, jpeg, gif, bmp, webp"; +const snErrorTxt = "png, jpg, jpeg"; export const useHandleFileChange = (setFiles, currentFlowId) => { const setErrorData = useAlertStore((state) => state.setErrorData); @@ -14,7 +14,7 @@ export const useHandleFileChange = (setFiles, currentFlowId) => { const fileInput = event.target; const file = fileInput.files?.[0]; if (file) { - const allowedExtensions = ["png", "jpg", "jpeg", "gif", "bmp", "webp"]; + const allowedExtensions = ["png", "jpg", "jpeg"]; const fileExtension = file.name.split(".").pop()?.toLowerCase(); if (!fileExtension || !allowedExtensions.includes(fileExtension)) { diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-upload.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-upload.tsx index f41cada11..a45fd171f 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-upload.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chatInput/hooks/use-upload.tsx @@ -5,7 +5,7 @@ import useAlertStore from "../../../../../../stores/alertStore"; const fsErrorText = "Please ensure your file has one of the following extensions:"; -const snErrorTxt = "png, jpg, jpeg, gif, bmp, webp"; +const snErrorTxt = "png, jpg, jpeg"; const useUpload = (uploadFile, currentFlowId, setFiles, lockChat) => { const setErrorData = useAlertStore((state) => state.setErrorData); @@ -21,14 +21,7 @@ const useUpload = (uploadFile, currentFlowId, setFiles, lockChat) => { const uid = new ShortUniqueId({ length: 3 }); const blob = items[i].getAsFile(); if (blob) { - const allowedExtensions = [ - "png", - "jpg", - "jpeg", - "gif", - "bmp", - "webp", - ]; + const allowedExtensions = ["png", "jpg", "jpeg"]; const fileExtension = blob.name.split(".").pop()?.toLowerCase(); if (!fileExtension || !allowedExtensions.includes(fileExtension)) { diff --git a/src/frontend/src/modals/IOModal/components/chatView/fileComponent/index.tsx b/src/frontend/src/modals/IOModal/components/chatView/fileComponent/index.tsx index b62e0f763..a034b1c40 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/fileComponent/index.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/fileComponent/index.tsx @@ -32,6 +32,8 @@ export default function FileCard({ BACKEND_URL.length - 1, )}${BASE_URL_API}files/images/${content}`; + console.log(imgSrc); + if (showFile) { if (imgTypes.has(fileType)) { return (