mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat: update getFile function to include application ID for URL retrieval
This commit is contained in:
parent
8c3caa27dd
commit
a05335a0b3
|
|
@ -10,8 +10,8 @@ const postImage: (data: any) => Promise<Result<any>> = (data) => {
|
|||
return post(`${prefix}`, data)
|
||||
}
|
||||
|
||||
const getFile: (params: any) => Promise<Result<any>> = (params) => {
|
||||
return get(`/oss/get_url` , params)
|
||||
const getFile: (application_id: string, params: any) => Promise<Result<any>> = (application_id, params) => {
|
||||
return get(`/oss/get_url/${application_id}`, params)
|
||||
}
|
||||
export default {
|
||||
postImage,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue