Commit 1eb98ef0 by Archer Committed by GitHub

fix: local file relatedImageId error (#5118)

parent a70d2aa9
......@@ -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
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment