cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shakhnazarov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-8881) [FileTransfer] Object values in params as send as string
Date Thu, 05 Nov 2015 07:00:34 GMT

     [ https://issues.apache.org/jira/browse/CB-8881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Shakhnazarov updated CB-8881:
------------------------------------
    Summary: [FileTransfer] Object values in params as send as string  (was: [FileTransfert]
Object values in params as send as string)

> [FileTransfer] Object values in params as send as string
> --------------------------------------------------------
>
>                 Key: CB-8881
>                 URL: https://issues.apache.org/jira/browse/CB-8881
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File Transfer
>    Affects Versions: 3.5.0
>            Reporter: Mickael Magniez
>
> When tryin to send structured data with files, values as send as string (representing
JSON object), rather than structured data.
> Example:
> {code:javascript}
> var options = new FileUploadOptions();
> options.fileKey = "file";
> options.fileName = 'file.jpg';
> options.mimeType = "image/jpg";
> var params = {object1: {value1: "1", value2:"2"}, object2: {value1: "1", value2:"2"}};
> options.params = params;
> var ft = new FileTransfer();
> ft.upload(filePath, encodeURI(url), win, fail, options);
> {code}
> My server code receives params 
> {code:javascript}
> object1 = "{\"value1\":\"1\",{\"value2\":\"2\"}"
> object2 = "{\"value1\":\"1\",{\"value2\":\"2\"}"
> {code}
> It should receive
> {code:javascript}
> object1 = {value1: "1", value2: "2"}
> object2 = {value1: "1", value2: "2"}
> {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


Mime
View raw message