feat: select the corresponding parsing method according to the file type and after the document is successfully uploaded, use the ChunkMethodModal to select the parsing method. and remove ChunkMethodModal from knowledge-file (#158)
* feat: select the corresponding parsing method according to the file type * feat: after the document is successfully uploaded, use the ChunkMethodModal to select the parsing method. * feat: add pdf types to ParserListMap * feat: remove ChunkMethodModal from knowledge-file
This commit is contained in:
@@ -25,6 +25,7 @@ const {
|
||||
document_rename,
|
||||
document_run,
|
||||
get_document_file,
|
||||
document_upload,
|
||||
} = api;
|
||||
|
||||
const methods = {
|
||||
@@ -82,6 +83,10 @@ const methods = {
|
||||
url: document_thumbnails,
|
||||
method: 'get',
|
||||
},
|
||||
document_upload: {
|
||||
url: document_upload,
|
||||
method: 'post',
|
||||
},
|
||||
// chunk管理
|
||||
chunk_list: {
|
||||
url: chunk_list,
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
import api from '@/utils/api';
|
||||
import request from '@/utils/request';
|
||||
|
||||
const { upload } = api;
|
||||
|
||||
const uploadService = {
|
||||
uploadFile: function (file: any, kb_id: string) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
formData.append('kb_id', kb_id);
|
||||
|
||||
const options = {
|
||||
method: 'post',
|
||||
data: formData,
|
||||
};
|
||||
|
||||
return request(upload, options);
|
||||
},
|
||||
};
|
||||
|
||||
export default uploadService;
|
||||
Reference in New Issue
Block a user