How to post multi-part form data in server fn?
I am posting a form on the client. You can see the image is what is captured before calling mutate using tanstack query. The request does not contain the file object because it defaults to request headers of content-type application/json
How do we post multi-part form data with a server function?

5 Replies
rare-sapphireOP•6mo ago
This is the request generated from server fn

frozen-sapphire•6mo ago
did you have a look at our tests?
frozen-sapphire•6mo ago
GitHub
router/e2e/react-start/server-functions/src/routes/submit-post-form...
🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering. - TanStack/router
frozen-sapphire•6mo ago
if that does not help, please provide a complete minimal example
rare-sapphireOP•6mo ago
Ah didn't see that thanks for pointing me in the right direction. Will try to get it working from here