multipart middleware (#5809)

* fix: multipart middleware

* fix: reviews
This commit is contained in:
Apoorv Mishra
2023-09-12 10:21:58 +05:30
committed by GitHub
parent 99e3a305d3
commit 401d1ba871
5 changed files with 48 additions and 20 deletions

View File

@@ -1,8 +1,10 @@
import formidable from "formidable";
import { z } from "zod";
const BaseSchema = z.object({
body: z.unknown(),
query: z.unknown(),
file: z.custom<formidable.File>().optional(),
});
export default BaseSchema;