feat: separate review images into /uploads/reviews/ subdir

This commit is contained in:
Kirill
2026-05-15 13:24:14 +05:00
parent 66b0558a42
commit c37743eee6
2 changed files with 11 additions and 8 deletions
+1
View File
@@ -16,6 +16,7 @@ export async function registerPublicReviewRoutes(fastify) {
const urls = await persistMultipartImages(request, {
maxFiles: 1,
maxFileBytes: getOtherUploadMaxFileBytes(),
subdir: 'reviews',
})
if (urls.length !== 1) return reply.code(400).send({ error: 'Нужно прикрепить 1 изображение' })
return { url: urls[0] }