mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix File Upload in Node.js (#26700)
Summary: 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. DiffTrain build for commit https://github.com/facebook/react/commit/a21d1475ffd7225a463f2d0c0c9b732c8dd795eb. Changelog: [Internal] Reviewed By: poteto Differential Revision: D45238341 fbshipit-source-id: d4ce8cf0201a231263c753989267e85f92908b9e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9d980ab251
commit
7b39531bc1
@@ -1 +1 @@
|
||||
36e4cbe2e918ec9c8a7abbfda28898c835361fb2
|
||||
a21d1475ffd7225a463f2d0c0c9b732c8dd795eb
|
||||
|
||||
Reference in New Issue
Block a user