dillon1000/react
Commit
Browse files [Flight] Fix File Upload in Node.js (#26700)
Use the Blob constructor + append with filename instead of File constructor. Node.js doesn't expose a global File constructor but does support it in this form. Queue fields until we get the 'end' event from the previous file. We rely on previous files being available by the time a field is resolved. However, since the 'end' event in Readable is fired after two micro-tasks, these are not resolved in order. I use a queue of the fields while we're still waiting on files to finish. This still doesn't resolve files and fields in order relative to each other but that doesn't matter for our usage.
Changed paths4 files
First-parent comparisonfixtures/flight/src/Form.js ModifiedM fixtures/flight/src/actions.js ModifiedM packages/react-server-dom-webpack/src/ReactFlightDOMServerNode.js ModifiedM packages/react-server/src/ReactFlightReplyServer.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…