Next.js Discord

Discord Forum

Do server actions support files without FormData now?

Unanswered
Florian posted this in #help-forum
Open in Discord
In the past, I had to wrap files sent to server actions into FormData. It seems this is not necessary anymore. Can anyone confirm this?

5 Replies

No I don't think so, you may still need FormData to receive files?
@James4u No I don't think so, you may still need FormData to receive files?
Hm I thought I sent the normal values but maybe I was still sending FormData. I don't have the code right now.
@James4u No I don't think so, you may still need FormData to receive files?
No I think the file is in the resolved values (without FormData)
@Florian No I think the file is in the resolved values (without FormData)
can you show me your codebase?
@James4u can you show me your codebase?
The code is not public right now but it's just a server action called from a client component with some data (including in image file) coming from Hook Form/Zod