You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to Access formData with createServerFn() #3137
I am using the example provided in the documentation for createServerFn(), but I am unable to access formData as expected. Despite following the implementation as shown, the function doesn't seem to work as intended.
I took the code example for using createServerFn() with formData directly from the documentation and placed it in /app/routes/index.tsx
If there's any additional setup or a specific requirement not mentioned in the documentation, please let me know.
The serializer/transformer needs to be enhanced to support serializing the entries in an instantiated FormData instance into something that can be sent over the wire and safely deserialize it on the server.
Activity
SeanCassiere commentedon Jan 10, 2025
I'm not sure if we ever had this or not but clearly this needs to be fixed.
Currently, submitting
FormDatato the server function using the.urlworks as expected, however, submitting it using the functions caller doesn't.i.e.
The serializer/transformer needs to be enhanced to support serializing the entries in an instantiated
FormDatainstance into something that can be sent over the wire and safely deserialize it on the server.SeanCassiere commentedon Jan 10, 2025
Need to investigate further why the multipart form data end-to-end example works, but this does not.
router/e2e/start/basic/app/routes/-server-fns/multipart-formdata-fn-call.tsx
Lines 42 to 51 in ab5a21b