feat: create folder #345 (#518)

### What problem does this PR solve?

feat: create folder
feat: ensure that all files in the current folder can be correctly
requested after renaming the folder
#345 

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-04-24 11:07:22 +08:00
committed by GitHub
parent 369400c483
commit 2d228dbf7f
10 changed files with 285 additions and 47 deletions

View File

@ -2,8 +2,14 @@ import api from '@/utils/api';
import registerServer from '@/utils/registerServer';
import request from '@/utils/request';
const { listFile, removeFile, uploadFile, renameFile, getAllParentFolder } =
api;
const {
listFile,
removeFile,
uploadFile,
renameFile,
getAllParentFolder,
createFolder,
} = api;
const methods = {
listFile: {
@ -26,6 +32,10 @@ const methods = {
url: getAllParentFolder,
method: 'get',
},
createFolder: {
url: createFolder,
method: 'post',
},
} as const;
const fileManagerService = registerServer<keyof typeof methods>(