feat: save the selected parser to the backend on the upload file page and upload document (#54)

* 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
This commit is contained in:
balibabu
2024-02-05 12:01:27 +08:00
committed by GitHub
parent 51482f3e2a
commit f305776217
18 changed files with 629 additions and 82 deletions

View File

@ -1,21 +1,21 @@
import request from '@/utils/request';
import api from '@/utils/api';
import request from '@/utils/request';
const { upload } = api;
const uploadService = {
uploadFile: function (file, kb_id) {
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
data: formData,
};
return request(upload, options);
}
},
};
export default uploadService;