mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-14 00:48:26 +08:00
* feat: add pagination to document table * feat: fetch document list by page * feat: poll the document list * feat: upload document * feat: save the selected parser to the backend on the upload file page
22 lines
453 B
TypeScript
22 lines
453 B
TypeScript
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;
|