mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? fix: cannot save the system model setting #468 feat: rename file in FileManager feat: add FileManager feat: override useSelector type ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
36
web/src/services/fileManagerService.ts
Normal file
36
web/src/services/fileManagerService.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import api from '@/utils/api';
|
||||
import registerServer from '@/utils/registerServer';
|
||||
import request from '@/utils/request';
|
||||
|
||||
const { listFile, removeFile, uploadFile, renameFile, getAllParentFolder } =
|
||||
api;
|
||||
|
||||
const methods = {
|
||||
listFile: {
|
||||
url: listFile,
|
||||
method: 'get',
|
||||
},
|
||||
removeFile: {
|
||||
url: removeFile,
|
||||
method: 'post',
|
||||
},
|
||||
uploadFile: {
|
||||
url: uploadFile,
|
||||
method: 'post',
|
||||
},
|
||||
renameFile: {
|
||||
url: renameFile,
|
||||
method: 'post',
|
||||
},
|
||||
getAllParentFolder: {
|
||||
url: getAllParentFolder,
|
||||
method: 'get',
|
||||
},
|
||||
} as const;
|
||||
|
||||
const fileManagerService = registerServer<keyof typeof methods>(
|
||||
methods,
|
||||
request,
|
||||
);
|
||||
|
||||
export default fileManagerService;
|
||||
Reference in New Issue
Block a user