diff --git a/ui/src/api/knowledge/document.ts b/ui/src/api/knowledge/document.ts index d381e1117..94f8bc782 100644 --- a/ui/src/api/knowledge/document.ts +++ b/ui/src/api/knowledge/document.ts @@ -230,7 +230,7 @@ const putDocumentSync: ( "source_file_id": string } */ -const postMulDocument: ( +const putMulDocument: ( knowledge_id: string, data: any, loading?: Ref, @@ -485,7 +485,7 @@ export default { exportDocumentZip, putDocumentRefresh, putDocumentSync, - postMulDocument, + putMulDocument, delMulDocument, putBatchGenerateRelated, putBatchEditHitHandling, diff --git a/ui/src/api/shared/document.ts b/ui/src/api/shared/document.ts index c703495c0..4b3a03810 100644 --- a/ui/src/api/shared/document.ts +++ b/ui/src/api/shared/document.ts @@ -223,7 +223,7 @@ const putDocumentSync: ( "source_file_id": string } */ -const postMulDocument: ( +const putMulDocument: ( knowledge_id: string, data: any, loading?: Ref, @@ -478,7 +478,7 @@ export default { exportDocumentZip, putDocumentRefresh, putDocumentSync, - postMulDocument, + putMulDocument, delMulDocument, putBatchGenerateRelated, putBatchEditHitHandling, diff --git a/ui/src/stores/modules-shared-system/document.ts b/ui/src/stores/modules-shared-system/document.ts index 827cc4858..34121128a 100644 --- a/ui/src/stores/modules-shared-system/document.ts +++ b/ui/src/stores/modules-shared-system/document.ts @@ -17,10 +17,10 @@ const useDocumentStore = defineStore('documen', { }) }) }, - async asyncPostDocument(knowledgeId: string, data: any, loading?: Ref) { + async asyncPutDocument(knowledgeId: string, data: any, loading?: Ref) { return new Promise((resolve, reject) => { documentApi - .postMulDocument(knowledgeId, data, loading) + .putMulDocument(knowledgeId, data, loading) .then((data) => { resolve(data) }) diff --git a/ui/src/stores/modules/document.ts b/ui/src/stores/modules/document.ts index ba9a8286d..089fc2c8d 100644 --- a/ui/src/stores/modules/document.ts +++ b/ui/src/stores/modules/document.ts @@ -17,10 +17,10 @@ const useDocumentStore = defineStore('document', { }) }) }, - async asyncPostDocument(knowledgeId: string, data: any, loading?: Ref) { + async asyncPutDocument(knowledgeId: string, data: any, loading?: Ref) { return new Promise((resolve, reject) => { documentApi - .postMulDocument(knowledgeId, data, loading) + .putMulDocument(knowledgeId, data, loading) .then((data) => { resolve(data) }) diff --git a/ui/src/views/document/UploadDocument.vue b/ui/src/views/document/UploadDocument.vue index c842ccabe..537fc95ca 100644 --- a/ui/src/views/document/UploadDocument.vue +++ b/ui/src/views/document/UploadDocument.vue @@ -147,7 +147,7 @@ function submit() { if (id) { // 上传文档 document - .asyncPostDocument(id as string, documents) + .asyncPutDocument(id as string, documents) .then(() => { MsgSuccess(t('common.submitSuccess')) clearStore() diff --git a/ui/src/views/document/index.vue b/ui/src/views/document/index.vue index 3c6585ae0..94553facf 100644 --- a/ui/src/views/document/index.vue +++ b/ui/src/views/document/index.vue @@ -779,7 +779,7 @@ function creatQuickHandle(val: string) { loading.value = true const obj = [{ name: val }] document - .asyncPostDocument(id, obj) + .asyncPutDocument(id, obj) .then(() => { getList() MsgSuccess(t('common.createSuccess')) diff --git a/ui/src/views/knowledge/KnowledgeSetting.vue b/ui/src/views/knowledge/KnowledgeSetting.vue index 4ce3ad4c6..a13cb9aab 100644 --- a/ui/src/views/knowledge/KnowledgeSetting.vue +++ b/ui/src/views/knowledge/KnowledgeSetting.vue @@ -130,11 +130,11 @@ @@ -177,6 +177,7 @@ const form = ref({ app_id: '', app_secret: '', folder_token: '', + file_count_limit: 100, }) const rules = reactive({ diff --git a/ui/src/views/shared/document-shared/UploadDocument.vue b/ui/src/views/shared/document-shared/UploadDocument.vue index 9a909075c..0112f9fd7 100644 --- a/ui/src/views/shared/document-shared/UploadDocument.vue +++ b/ui/src/views/shared/document-shared/UploadDocument.vue @@ -148,7 +148,7 @@ function submit() { if (id) { // 上传文档 document - .asyncPostDocument(id as string, documents) + .asyncPutDocument(id as string, documents) .then(() => { MsgSuccess(t('common.submitSuccess')) clearStore() diff --git a/ui/src/views/shared/document-shared/index.vue b/ui/src/views/shared/document-shared/index.vue index faf9c4826..264e00821 100644 --- a/ui/src/views/shared/document-shared/index.vue +++ b/ui/src/views/shared/document-shared/index.vue @@ -784,7 +784,7 @@ function creatQuickHandle(val: string) { loading.value = true const obj = [{ name: val }] document - .asyncPostDocument(id, obj) + .asyncPutDocument(id, obj) .then(() => { getList() MsgSuccess(t('common.createSuccess'))