mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-07 03:48:44 +08:00
Fix: Uploading TSV format documents to the knowledge base did not generate any error messages. (#15284)
### What problem does this PR solve? Fix: Uploading TSV format documents to the knowledge base did not generate any error messages. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -7,7 +7,7 @@ import authorizationUtil, {
|
||||
} from '@/utils/authorization-util';
|
||||
import notification from '@/utils/notification';
|
||||
import axios from 'axios';
|
||||
import { convertTheKeysOfTheObjectToSnake } from './common-util';
|
||||
import { convertTheKeysOfTheObjectToSnake, isFormData } from './common-util';
|
||||
import { setCachedLlmList } from './llm-cache';
|
||||
import { addTenantParams } from './llm-util';
|
||||
|
||||
@@ -88,7 +88,9 @@ request.interceptors.request.use(
|
||||
const params = convertTheKeysOfTheObjectToSnake(config.params);
|
||||
|
||||
// Add tenant parameters to data
|
||||
const dataWithTenantParams = addTenantParams(data, config.url);
|
||||
const dataWithTenantParams = isFormData(data)
|
||||
? data
|
||||
: addTenantParams(data, config.url);
|
||||
|
||||
const newConfig = { ...config, data: dataWithTenantParams, params };
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import authorizationUtil, {
|
||||
} from '@/utils/authorization-util';
|
||||
import notification from '@/utils/notification';
|
||||
import { RequestMethod, extend } from 'umi-request';
|
||||
import { convertTheKeysOfTheObjectToSnake } from './common-util';
|
||||
import { convertTheKeysOfTheObjectToSnake, isFormData } from './common-util';
|
||||
import { setCachedLlmList } from './llm-cache';
|
||||
import { addTenantParams } from './llm-util';
|
||||
|
||||
@@ -92,7 +92,9 @@ request.interceptors.request.use((url: string, options: any) => {
|
||||
const params = convertTheKeysOfTheObjectToSnake(options.params);
|
||||
|
||||
// Add tenant parameters to data
|
||||
const dataWithTenantParams = addTenantParams(data, url);
|
||||
const dataWithTenantParams = isFormData(data)
|
||||
? data
|
||||
: addTenantParams(data, url);
|
||||
|
||||
return {
|
||||
url,
|
||||
|
||||
Reference in New Issue
Block a user