Open dhayanth-dharma opened 2 years ago
@dhayanth-dharma I'm encountering the same issue. Did you find a solution or workaround?
@lnoir This is not resolved yet. You can follow the issue >> https://github.com/capacitor-community/http/issues/213
I started to use the following Cordova plugin >> https://www.npmjs.com/package/cordova-plugin-advanced-http and it works well with formData. Capacitor considers the Cordova plugin as an npm pack. You can use this plugin or Axios with a CORS proxy server.
@dhayanth-dharma Yea I came across that plugin too, but I ended up just setting the server host parameter to a subdomain in the capacitor config.
Describe the bug I'm using this http plugin in Vue 3 + Ionic 6. The formdata is being sent successfully when I test it on the browser. I am using the following headers:
But, empty data is sent when testing the app on the Android simulator. I have tried Http.uploadFile() too. But still, I get empty data to the server-side. I have File (Blob) object in the form data.
My code:
Expected behavior I want to send multipart/formdata to the API endpoint with this plugin.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Am I missing any options here? I could not find any related information in the document.