mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-05 07:10:29 +08:00
fix: move agent attachment download api (#15146)
### What problem does this PR solve? move agent attachment download api to the correct route and update frontend callers ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) ### Notes - Move the attachment download endpoint from document routes to agent routes. - Update frontend download callers to use the agent attachment endpoint. - Reuse the shared file response header helper instead of duplicating it in `agent_api.py`.
This commit is contained in:
@@ -13,7 +13,7 @@ const {
|
||||
getFile,
|
||||
moveFile,
|
||||
getDatasetDocumentFileDownload,
|
||||
getDocumentFileDownload,
|
||||
getAttachmentFileDownload,
|
||||
} = api;
|
||||
|
||||
const methods = {
|
||||
@@ -62,8 +62,8 @@ const fileManagerService = registerServer<keyof typeof methods>(
|
||||
request,
|
||||
);
|
||||
|
||||
export const downloadFile = (data: { docId: string; ext: string }) => {
|
||||
return request.get(getDocumentFileDownload(data.docId), {
|
||||
export const downloadAgentFile = (data: { docId: string; ext: string }) => {
|
||||
return request.get(getAttachmentFileDownload(data.docId), {
|
||||
params: { ext: data.ext },
|
||||
responseType: 'blob',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user