ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
11.81k stars 994 forks source link

[Bug]: http request break on Android when sending formData #7589

Open jongbonga opened 1 month ago

jongbonga commented 1 month ago

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 6.1.1
  @capacitor/core: 6.1.1
  @capacitor/android: 6.1.1
  @capacitor/ios: 6.1.1

Installed Dependencies:

  @capacitor/cli: 6.1.1
  @capacitor/core: 6.1.1
  @capacitor/ios: 6.1.1
  @capacitor/android: 6.1.1

Other API Details

npm -v 10.7.0
node -v v18.20.4

Platforms Affected

Current Behavior

on Capacitor 5 sending formData with CapacitorHttp enabled on config and content-type: 'multipart/form-data' hard-coded in the headers works fine, it fails on Capacitor 6

Expected Behavior

it should work with content-type: 'multipart/form-data' or documented somewhere

Project Reproduction

https://github.com/jongbonga/code-reproduction

Additional Information

There is a PR for the issue here

ionitron-bot[bot] commented 2 weeks ago

This issue has been labeled as type: bug. This label is added to issues that that have been reproduced and are being tracked in our internal issue tracker.

grzegorzCieslik95 commented 2 weeks ago

The same:

5.5.1 -> my express service got content type content-type’: ‘multipart/form-data as default 6.0.1 -> i got content-type': 'application/x-www-form-urlencoded without file in data

Any idea how can i fix this?

jcesarmobile commented 2 weeks ago

please, report a new issue, that seems like a different problem