mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-03 00:55:10 +08:00
### What problem does this PR solve? Feat: Add metadata configuration for new chats #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -3,7 +3,7 @@ import { useUploadAndParseFile } from '@/hooks/use-chat-request';
|
||||
import { useCallback, useState } from 'react';
|
||||
|
||||
export function useUploadFile() {
|
||||
const { uploadAndParseFile } = useUploadAndParseFile();
|
||||
const { uploadAndParseFile, loading } = useUploadAndParseFile();
|
||||
const [fileIds, setFileIds] = useState<string[]>([]);
|
||||
|
||||
const handleUploadFile: NonNullable<FileUploadProps['onUpload']> =
|
||||
@ -23,5 +23,5 @@ export function useUploadFile() {
|
||||
setFileIds([]);
|
||||
}, []);
|
||||
|
||||
return { handleUploadFile, clearFileIds, fileIds };
|
||||
return { handleUploadFile, clearFileIds, fileIds, isUploading: loading };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user