Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix a bug in 'assistant-setting.tsx' that causes the upload button to… (#796)

lcjia_you63ca15c59550
diff --git a/.gitignore b/.gitignore
index ef393f31ea..87fcc66ae8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,4 @@ Cargo.lock
docker/ragflow-logs/
/flask_session
/logs
+rag/res/deepdoc
\ No newline at end of file
diff --git a/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx b/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx
index fdaa08c299..97d998f5c9 100644
--- a/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx
+++ b/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx
@@ -22,6 +22,15 @@ const AssistantSetting = ({ show }: ISegmentedContentProps) => {
return e?.fileList;
};
+ const uploadButtion = (
+ <button style={{ border: 0, background: 'none' }} type="button">
+ <PlusOutlined />
+ <div style={{ marginTop: 8 }}>
+ {t('upload', { keyPrefix: 'common' })}
+ </div>
+ </button>
+ )
+
return (
<section
className={classNames({
@@ -46,12 +55,7 @@ const AssistantSetting = ({ show }: ISegmentedContentProps) => {
maxCount={1}
showUploadList={{ showPreviewIcon: false, showRemoveIcon: false }}
>
- <button style={{ border: 0, background: 'none' }} type="button">
- <PlusOutlined />
- <div style={{ marginTop: 8 }}>
- {t('upload', { keyPrefix: 'common' })}
- </div>
- </button>
+ {show ? uploadButtion : null}
</Upload>
</Form.Item>
<Form.Item