Fix: Added the ability to download files in the agent message reply function. (#11281)

### What problem does this PR solve?

Fix: Added the ability to download files in the agent message reply
function.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-11-14 19:50:01 +08:00
committed by GitHub
parent db4fd19c82
commit 996b5fe14e
11 changed files with 108 additions and 5 deletions

View File

@ -13,6 +13,7 @@ const {
get_document_file,
getFile,
moveFile,
get_document_file_download,
} = api;
const methods = {
@ -65,4 +66,10 @@ const fileManagerService = registerServer<keyof typeof methods>(
request,
);
export const downloadFile = (data: { docId: string; ext: string }) => {
return request.get(get_document_file_download(data.docId), {
params: { ext: data.ext },
responseType: 'blob',
});
};
export default fileManagerService;