Andrew Gaun created CB-11118:
--------------------------------
Summary: Array and object params on upload ignored in ios
Key: CB-11118
URL: https://issues.apache.org/jira/browse/CB-11118
Project: Apache Cordova
Issue Type: Bug
Components: Plugin File Transfer
Affects Versions: 1.5.0
Environment: iOS
Reporter: Andrew Gaun
On iOS, CDVFileTransfer.m the method requestForUploadCommand will only allow
params objects with selector stringValue and NSString to be included with the
request.
On Android objects and arrays are turned into strings when used as params
Example:
{code:javascript}
var fileUploadOptions = new FileUploadOptions();
fileUploadOptions.params = {
"array": [1,2,3],
"object": {
"a": 1
},
number: 123
}
{code}
will return from iOS
{code:javascript}
{
number: '123'
}
{code}
and from android
{code:javascript}
{
array: '[1,2,3]',
object: '{"a":1}',
number: '123'
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]