fix: formData upload broken in debug builds#56406
Conversation
|
@alanleedev has imported this pull request. If you are a Meta employee, you can view this in D100258994. |
|
@riteshshukla04 Thanks for the quick fix. We'll pick this into 0.85.1. |
|
This pull request was successfully merged by @riteshshukla04 in 0d1b70e When will my fix make it into a release? | How to file a pick request? |
Thanks for landing this. I will file a CP request |
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: aeda47d45db2152027598c949f0e602a586c4cb3
|
This pull request was successfully merged by @riteshshukla04 in 9dfd26e When will my fix make it into a release? | How to file a pick request? |
|
Hey — @riteshshukla04 @alanleedev thanks again for fixing and merging this; it fixed the FormData upload regression on Android. Quick follow-up: by design we still return the literal "[Preview unavailable]" for : |
|
I opened #56742 as a small follow-up on top of 0d1b70e. It keeps the same guarantee (we never call writeTo on a one-shot body), If @alanleedev @riteshshukla04 guys have bandwidth please review the PR, I’d love another pass since this directly stacks on top of your change. |
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:-
Fix is to walk to each children of multipart and check for Oneshot
Changelog:
[ANDROID][FIXED] - FormData uploads broken in debug builds
Test Plan:
Tested on RN tester
