Do all server actions use encType="multipart/form-data"
?
#77841
-
SummaryDo all server actions use Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Interesting question. I have explored that server actions use a text plain content type, and multipart/form-data, more over I found this bit in the React codebase: console.error(
'Cannot specify a encType or method for a form that specifies a ' +
'function as the action. React provides those automatically. ' +
'They will get overridden.',
); So, specifying that, is not gonna do it. I also though of calling the server action manually, with URLSearchParams, but that goes the plain text road... Just throwing this other file in, where some serialization happens, https://github.com/facebook/react/blob/3644f0bd214b7c08a522cc9212dfca902777bf8c/packages/react-client/src/ReactFlightReplyClient.js#L117-L120 Do you have a specific use case in mind? |
Beta Was this translation helpful? Give feedback.
Interesting question. I have explored that server actions use a text plain content type, and multipart/form-data, more over I found this bit in the React codebase:
So, specifying that, is not gonna do it. I also though of calling the server action manually, with URLSearchParams, but that goes the plain t…