fix file upload

This commit is contained in:
2023-08-22 12:55:01 -05:00
parent 2c3d53f317
commit 4dbc46c1c0
2 changed files with 3 additions and 6 deletions

View File

@ -60,7 +60,9 @@ const handler: NextApiHandler = async (req, res) => {
},
data: {
photo: {
name: getFileName((await uploadPhoto).filepath),
name: getFileName(
(await uploadPhoto).originalFilename ?? "resource ICON"
),
data: photoBuffer,
},
},