mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-24 23:46:52 +08:00
feat: add image uploader in edit chunk dialog (#12003)
### What problem does this PR solve? Add image uploader in edit chunk dialog for replacing image chunk ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -7,10 +7,16 @@ export const isFormData = (data: unknown): data is FormData => {
|
||||
return data instanceof FormData;
|
||||
};
|
||||
|
||||
const excludedFields = ['img2txt_id', 'mcpServers'];
|
||||
const excludedFields: Array<string | RegExp> = [
|
||||
'img2txt_id',
|
||||
'mcpServers',
|
||||
'image_base64',
|
||||
];
|
||||
|
||||
const isExcludedField = (key: string) => {
|
||||
return excludedFields.includes(key);
|
||||
return excludedFields.some((excl) =>
|
||||
excl instanceof RegExp ? excl.test(key) : excl === key,
|
||||
);
|
||||
};
|
||||
|
||||
export const convertTheKeysOfTheObjectToSnake = (data: unknown) => {
|
||||
|
||||
Reference in New Issue
Block a user