I managed to upload an image to my server using Cordova File Transfer plugin.
var img =
var url =
var o
Based on the source code:
boolean multipartFormUpload = (headers == null) || !headers.has("Content-Type");
if (multipartFormUpload) {
conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + BOUNDARY);
}
You can find it is easy to disable the multipart header by setting a dummy header option in your javascript:
options.headers = {"Content-Type":"dummy"}; // set it to something to avoid the plug-in append the header