Next.js Discord

Discord Forum

passing file to a serve action

Answered
African Slender-snouted Crocodil… posted this in #help-forum
Open in Discord
African Slender-snouted CrocodileOP
@"use php"

8 Replies

Answer
Try this
African Slender-snouted CrocodileOP
ohh wow thank you this was what i was doing before
file: z
    .array(fileSchema)
    .min(1, "At least one file is required")
    .max(5, "Maximum 5 files are allowed"), export const schema = z.object({
  name: z.string().min(1, { message: "Required" }),
  description: z.string().min(3),
`
@"use php" https://www.npmjs.com/package/zod-form-data
Can you mark solution please?
African Slender-snouted CrocodileOP
ohhhh wow this is using zod formdata wow thank you soo much never this package exsit
no problem, can you mark that message as solution
@"use php" https://www.npmjs.com/package/zod-form-data
Right Click > Apps > Mark solution
thanks. You can ping me anytime in any other thread when you need help!