You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/10/29 03:27:58 UTC
[jira] [Commented] (CB-11118) Array and object params on upload
ignored in ios
[ https://issues.apache.org/jira/browse/CB-11118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15617323#comment-15617323 ]
ASF GitHub Bot commented on CB-11118:
-------------------------------------
Github user signalpoint commented on the issue:
https://github.com/apache/cordova-plugin-file-transfer/pull/143
+1 , this saved the day for me!
> 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
> Labels: easyfix, iOS, triaged
>
> 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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org