From a05335a0b3212cb8e6e5c269f4ebdbf69bb45b0b Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 27 Nov 2025 17:44:36 +0800 Subject: [PATCH] feat: update getFile function to include application ID for URL retrieval --- ui/src/api/image.ts | 4 ++-- .../components/ai-chat/component/chat-input-operate/index.vue | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/src/api/image.ts b/ui/src/api/image.ts index 6bfacd248..e9715daf3 100644 --- a/ui/src/api/image.ts +++ b/ui/src/api/image.ts @@ -10,8 +10,8 @@ const postImage: (data: any) => Promise> = (data) => { return post(`${prefix}`, data) } -const getFile: (params: any) => Promise> = (params) => { - return get(`/oss/get_url` , params) +const getFile: (application_id: string, params: any) => Promise> = (application_id, params) => { + return get(`/oss/get_url/${application_id}`, params) } export default { postImage, diff --git a/ui/src/components/ai-chat/component/chat-input-operate/index.vue b/ui/src/components/ai-chat/component/chat-input-operate/index.vue index 098f39189..168dac9b1 100644 --- a/ui/src/components/ai-chat/component/chat-input-operate/index.vue +++ b/ui/src/components/ai-chat/component/chat-input-operate/index.vue @@ -1237,7 +1237,8 @@ async function saveUrl() { // 异步校验单个 URL async function processUrl(url: string) { try { - const res = await imageApi.getFile({url}); + const appId = props.appId || props.applicationDetails?.id; + const res = await imageApi.getFile(appId, {url}); if (!res.data) { MsgWarning(url + ' ' + t('chat.uploadFile.invalidUrl')); return;