Ability to parse and access form data in server middleware functions. #3575
Unanswered
christophior
asked this question in
Q&A
Replies: 1 comment 2 replies
-
You need to either pass the already parsed data as you said or clone the request in Express so you can read the body without making it impossible to read to Remix. The whole issue is because request bodies could only be read once, you need to clone the request to read it more than once. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all, reaching out to see how to possibly access the form data in an Express middleware that gets hit before we reach a remix action function. Currently when we attempt to parse the form data the action function in remix will not have any data since it has already been parsed.
One possible workaround might be to parse the data and then have the data injected into the
context
object viagetLoadContext()
. Another possible solution could be to have a way to let remix know that the form data has already been parsed.Beta Was this translation helpful? Give feedback.
All reactions