Skip to main content

index/variables/fileUploadSchema.md

const fileUploadSchema: z.ZodObject<{ file: z.ZodUnion<readonly [z.ZodInstanceOf<File>, z.ZodInstanceOf<Buffer<ArrayBufferLike>>]>; name: z.ZodString; size: z.ZodNumber; type: z.ZodEnum<{ image/gif: "image/gif"; image/jpeg: "image/jpeg"; image/jpg: "image/jpg"; image/png: "image/png"; image/svg+xml: "image/svg+xml"; image/webp: "image/webp"; }>; }, z.core.$strip>

File upload validation schema Validates file size, type, and filename