I have a Cordova app for iOS that I am currently updating to support Android. I have most of the problems, but the FileTransfer plugin does not include FileUploadOptions.paramsin the request. Everything works fine on iOS. With Android, the request is sent and everything looks fine, except that the request that reaches the server has no form fields.
I set a breakpoint just before the method call upload, and the object options.paramslooks right.
I am testing Android 4.4.3, Cordova 3.5 and the FileTransfer 0.4.4 plugin. The server works with Apache and has SSL.
Here is my code:
var options = new FileUploadOptions();
options.chunkedMode = false;
options.mimeType = 'audio/mp4';
options.fileKey = 'file';
options.fileName = filename;
options.params = {
'siteId': siteId,
'name': nameFld.getValue(),
'date': sqlDate,
'length': Math.round(storyLength)
};
options.headers={'Authorize': token};
var ft = new FileTransfer();
ft.upload(path, url, uploadSuccess, uploadFail, options);
I found the same problem here, with no answer:
PhoneTap file upload does not pass POST parameters
UPDATE: :
https://issues.apache.org/jira/browse/CB-7171