mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-04-24 04:35:32 +08:00
Feat: Add chunk also supports uploading image. (#13628)
### What problem does this PR solve? Feat: Add chunk also supports uploading image. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -382,7 +382,7 @@ export function FileUploader(props: FileUploaderProps) {
|
||||
<div className="relative flex flex-col gap-4 overflow-hidden">
|
||||
{!(hideDropzoneOnMaxFileCount && reachesMaxFileCount) && (
|
||||
<Tabs defaultValue="file" className="w-full">
|
||||
<TabsList className="w-full justify-start">
|
||||
<TabsList className="w-fit justify-start">
|
||||
<TabsTrigger value="file" className="gap-2">
|
||||
<FileText className="size-4" />
|
||||
{t('fileManager.files', 'Files')}
|
||||
|
||||
@ -146,7 +146,6 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
{/* Do not display the type field in create mode */}
|
||||
{isEditMode && (
|
||||
<FormField
|
||||
@ -174,7 +173,7 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
|
||||
/>
|
||||
)}
|
||||
|
||||
{isEditMode && form.getValues('doc_type_kwd') === 'image' && (
|
||||
{(!isEditMode || form.getValues('doc_type_kwd') + '' === 'image') && (
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="image"
|
||||
@ -213,7 +212,6 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="important_kwd"
|
||||
@ -227,7 +225,6 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="question_kwd"
|
||||
@ -255,7 +252,6 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
{isTagParser && (
|
||||
<FormField
|
||||
control={form.control}
|
||||
@ -271,7 +267,6 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
|
||||
{!isTagParser && (
|
||||
<FormProvider {...form}>
|
||||
<TagFeatureItem />
|
||||
|
||||
Reference in New Issue
Block a user