[Bug]: When CapacitorHttp is enabled, FormData does not function properly. What methods are there to solve this problem?
Capacitor Version
"dependencies": { "@capacitor/android": "6.1.2", "@capacitor/app": "6.0.1", "@capacitor/camera": "^6.1.2", "@capacitor/core": "6.1.2", "@capacitor/filesystem": "6.0.2", "@capacitor/geolocation": "^6.1.0", "@capacitor/haptics": "6.0.1", "@capacitor/ios": "6.1.2", "@capacitor/keyboard": "^6.0.2", "@capacitor/preferences": "^6.0.2", "@capacitor/status-bar": "6.0.1", },
import type { CapacitorConfig } from '@capacitor/cli' const config: CapacitorConfig = { appId: 'com.xapp.app', appName: 'XApp', webDir: 'dist', server: { androidScheme: 'http', cleartext: true }, plugins: { 'CapacitorUpdater': { 'autoUpdate': false, 'statsUrl':'' }, 'Permissions': { microphone: true }, //启用http "CapacitorHttp": { enabled: true } } }当启用CapacitorHttp后,formData类型无法上传
Other API Details
Platforms Affected
- [ ] iOS
- [x] Android
- [ ] Web
Current Behavior
上传文件的content-type丢失
Expected Behavior
能够正常上传form-data类型的文件
Project Reproduction
''
Additional Information
No response
Update to Capacitor 7, some http plugin bugs where fixed recently
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.