diff --git a/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx b/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx index b2bedb785f..6520696934 100644 --- a/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx +++ b/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx @@ -75,7 +75,7 @@ const ChatWrapper = () => { parent_message_id: last_answer?.id || getLastAnswer(chatListRef.current)?.id || null, } - if (appConfig?.file_upload?.image.enabled && files?.length) + if (appConfig?.file_upload?.image?.enabled && files?.length) data.files = files handleSend( diff --git a/web/app/components/base/chat/chat/answer/index.tsx b/web/app/components/base/chat/chat/answer/index.tsx index 3b7c8308ad..1ee098a1db 100644 --- a/web/app/components/base/chat/chat/answer/index.tsx +++ b/web/app/components/base/chat/chat/answer/index.tsx @@ -156,7 +156,7 @@ const Answer: FC = ({ ) } { - allFiles?.length && ( + !!allFiles?.length && ( { parent_message_id: last_answer?.id || getLastAnswer(chatListRef.current)?.id || null, } - if (appConfig?.file_upload?.image.enabled && files?.length) + if (appConfig?.file_upload?.image?.enabled && files?.length) data.files = files handleSend(