feat: upload file in FileManager #345 (#529)

### What problem does this PR solve?

feat: upload file in FileManager #345 

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-04-25 08:46:18 +08:00
committed by GitHub
parent b06d6395bb
commit 51e7697df7
17 changed files with 412 additions and 50 deletions

View File

@@ -74,4 +74,5 @@ export default {
renameFile: `${api_host}/file/rename`,
getAllParentFolder: `${api_host}/file/all_parent_folder`,
createFolder: `${api_host}/file/create`,
connectFileToKnowledge: `${api_host}/file2document/convert`,
};

View File

@@ -85,3 +85,12 @@ export const downloadFile = ({
downloadElement.click();
document.body.removeChild(downloadElement);
};
export const getFilePathByWebkitRelativePath = (file: File) => {
const path = file.webkitRelativePath;
return path;
// if (path !== '') {
// return path.slice(0, path.lastIndexOf('/'));
// }
// return path;
};