Commit 0d1b70e
fix: formData upload broken in debug builds (#56406)
Summary:
So the formData Upload in fetch is broken on 0.85 on main.
I tracked down this PR #55456
Also reported here #56404
RCA:-
```
body.isOneShot()
body.writeTo(buffer) // This is draining inner file InputStreams
```
Fix is to walk to each children of multipart and check for Oneshot
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[ANDROID][FIXED] - FormData uploads broken in debug builds
Pull Request resolved: #56406
Test Plan:
Tested on RN tester
<img width="416" height="600" alt="image" src="https://github.com/user-attachments/assets/20cae662-e2ba-4fc7-9f8d-d8e365eb95b2" />
Reviewed By: fabriziocucci, huntie
Differential Revision: D100258994
Pulled By: alanleedev
fbshipit-source-id: aeda47d45db2152027598c949f0e602a586c4cb31 parent 8dede75 commit 0d1b70e
File tree
2 files changed
+10
-0
lines changed- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network
2 files changed
+10
-0
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
263 | 264 | | |
264 | 265 | | |
265 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
266 | 274 | | |
267 | 275 | | |
268 | 276 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
| |||
0 commit comments