mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
fix: local file relatedImageId error (#5118)
This commit is contained in:
parent
a70d2aa9f3
commit
1eb98ef0fe
|
|
@ -43,8 +43,6 @@ async function handler(req: NextApiRequest, res: NextApiResponse<any>): CreateCo
|
|||
const { fileMetadata, collectionMetadata, ...collectionData } = data;
|
||||
const collectionName = file.originalname;
|
||||
|
||||
const relatedImgId = getNanoid();
|
||||
|
||||
// 1. upload file
|
||||
const fileId = await uploadFile({
|
||||
teamId,
|
||||
|
|
@ -71,7 +69,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse<any>): CreateCo
|
|||
fileId,
|
||||
metadata: {
|
||||
...collectionMetadata,
|
||||
relatedImgId
|
||||
relatedImgId: fileId
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue