mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-27 02:42:00 +08:00
Refactor: migrate doc upload info used in chat (#14359)
### What problem does this PR solve? Before migration: POST /v1/document/upload_info/ After migration: POST /api/v1/documentss/upload/ ### Type of change - [x] Refactoring
This commit is contained in:
@@ -492,9 +492,9 @@ export function useUploadAndParseFile() {
|
||||
formData.append('file', file);
|
||||
formData.append('conversation_id', conversationId || id);
|
||||
|
||||
const { data } = await chatService.uploadAndParse(
|
||||
const { data } = await chatService.documentInfoUpload(
|
||||
{
|
||||
url: api.uploadAndParse,
|
||||
url: api.documentInfoUpload,
|
||||
signal: controller.current.signal,
|
||||
data: formData,
|
||||
onUploadProgress: ({ progress }) => {
|
||||
|
||||
@@ -19,7 +19,7 @@ const {
|
||||
chatsTts,
|
||||
chatsMindmap,
|
||||
chatsRelatedQuestions,
|
||||
uploadAndParse,
|
||||
documentInfoUpload,
|
||||
fetchExternalChatInfo,
|
||||
} = api;
|
||||
|
||||
@@ -92,9 +92,9 @@ const methods = {
|
||||
url: chatsRelatedQuestions,
|
||||
method: 'post',
|
||||
},
|
||||
uploadAndParse: {
|
||||
documentInfoUpload: {
|
||||
method: 'post',
|
||||
url: uploadAndParse,
|
||||
url: documentInfoUpload,
|
||||
},
|
||||
fetchExternalChatInfo: {
|
||||
url: fetchExternalChatInfo,
|
||||
|
||||
@@ -130,7 +130,7 @@ export default {
|
||||
`${restAPIv1}/datasets/${datasetId}/documents`,
|
||||
webCrawl: (datasetId: string) =>
|
||||
`${restAPIv1}/datasets/${datasetId}/documents?type=web`,
|
||||
uploadAndParse: `${webAPI}/document/upload_info`,
|
||||
documentInfoUpload: `${restAPIv1}/documents/upload`,
|
||||
setMeta: `${webAPI}/document/set_meta`,
|
||||
getDatasetFilter: (datasetId: string) =>
|
||||
`${restAPIv1}/datasets/${datasetId}/documents?type=filter`,
|
||||
|
||||
Reference in New Issue
Block a user