You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: HACKS.md
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -351,3 +351,15 @@ When we upgrade to a react native version that contentOffset works for android
351
351
352
352
contentOffset for vertical scrollviews appear to be broken on v0.66.4 (current version). We need the contentOffset to initially hide the HeaderComponent. The workaround currently is to use contentContainerStyle and set the marginTop to -HeightOfHeaderComponent and then remove this when a user scrolls to the top.
353
353
Caveat/Introduced bug: User has to scroll to an offset of any number > 0 to revert the marginTop to 0.
354
+
355
+
## [iOS specific bug]: Images posted to server via fetch in `multipart/form-data` get their size inflated significantly
356
+
357
+
#### When we can remove this:
358
+
359
+
When this problem will be fixed in one of the next React Native releases (fixes were already added in 0.66.4, but were eventually [reversed](https://github.com/facebook/react-native/commit/e83feffeba567b4e304181632128ee1caa036c45))
360
+
361
+
#### Explanation/Context
362
+
363
+
When we try to upload a file with the `.jpg` extension in `multipart/form-data` format via `fetch`, then the size of this file will be increased on iOS. That bug happens not due to the file content nor for the blob MIME but just due to the file extension. See more about this problem [here](https://github.com/facebook/react-native/issues/27099).
364
+
365
+
One of the simplest solutions to this problem is to rename the file and add a suffix (for example, from `filename.jpg` to `filename.jpg.toUpload`)
0 commit comments