[iOS] Uploading an image will change the file size of the image
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
Description
I uploaded a 2M image and the server received a 6M image. After debugging, the form data sent by the RCTNetworking became larger.
Steps to reproduce
-
Clone the reproducer from
https://github.com/carverhong/react-native-reproducer-ios-image-upload.git. -
Install dependency and prepare the ios project.
cd react-native-reproducer-ios-image-upload
npm install
bundle install
cd ios
bundle exec pod install
After the installation is complete, the RCTNetworking log patch is automatically added for debugging.
- Start Metro.
npm start
- Open
HelloWorld.xcworkspacewith XCode and run the APP. - Use the
RCTNetworkingkeyword to filter logs.
React Native Version
0.72.15
Affected Platforms
Runtime - iOS
Output of npx react-native info
System:
OS: macOS 14.4.1
CPU: (8) arm64 Apple M3
Memory: 87.55 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.19.0
path: ~/tools/nodejs/node-v18.19.0-darwin-arm64/bin/node
Yarn: Not Found
npm:
version: 10.2.3
path: ~/tools/nodejs/node-v18.19.0-darwin-arm64/bin/npm
Watchman: Not Found
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Android SDK: Not Found
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11076708
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.11
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.15
wanted: 0.72.15
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Stacktrace or Logs
[RCTNetworking processDataForHTTPQuery] file:///Users/carverhong/Library/Developer/CoreSimulator/Devices/E094052D-91B7-493F-A39A-72F089B8937D/data/Containers/Bundle/Application/8BFC2E5C-87BD-4295-A8F0-F04272BC374A/HelloWorld.app/20240808144728-0.jpg rawDataSize=2017293
[RCTNetworking handleResult] multipartDataSize=6151776
Reproducer
https://github.com/carverhong/react-native-reproducer-ios-image-upload.git
Screenshots and Videos
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された再現手順とその RCTNetworking ログから始め、processDataForHTTPQuery パスと handleResult パスを追跡します。iOS のアップロード中に rawDataSize と multipartDataSize を比較し、どこで膨張が発生するのかを特定します。サーバーが報告されたサイズ増加なしにアップロードされた画像を受信し、そのケースの回帰テストによるカバレッジがあることを完了条件とします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- ios, react-native
- 領域
- mobile, networking
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100