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