You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Andrew Grieve (JIRA)" <ji...@apache.org> on 2012/10/05 17:32:03 UTC

[jira] [Resolved] (CB-1592) PhoneGap 2.0 FileTransfer upload - Additional parameters aren't send to server

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

Andrew Grieve resolved CB-1592.
-------------------------------

    Resolution: Invalid
    
> PhoneGap 2.0 FileTransfer upload - Additional parameters aren't send to server
> ------------------------------------------------------------------------------
>
>                 Key: CB-1592
>                 URL: https://issues.apache.org/jira/browse/CB-1592
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.0.0, 2.1.0
>         Environment: Macosx - phonegap 2.1 - xcode
>            Reporter: Andrea Casarella
>            Assignee: Andrew Grieve
>            Priority: Minor
>
> function uploadImage(){
>     var url = webServiceURL + "some-page.html;jsessionid="+$("#jsessionId").val();
>     
>     var imgURI = $("#imageToUpload").attr("src");
>     console.log('Image Uri to Upload - '+imgURI);
>     var options = new FileUploadOptions();
>     options.fileKey="formFile";
>     options.fileName= $("#fileName").val();
>     options.mimeType="image/jpeg";
>     
>     var params = new Object();
>     params.pid = '123456';
>     params.json = 'true';
>     params.upload = 'true';
>     options.chunkedMode = false;
>     options.params = params;
>     
>     var ft = new FileTransfer();
>     ft.upload(imgURI, encodeURI(url), uploadSuccess, uploadError, options, true);
>     return false;
> }
> Always Same error:
> FileTransferError {
>     code = 3;
>     "http_status" = 403;
>     source = "http://..."; //
>     target = "file://localhost/...";
> }
> and thats correct bacause my server needs the parameters (pid, json,upload), but it seems that are not passed anymore.
> I've tried also to set the "headers" as suggested for IOS quirks, but no changes.
> Any solution?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira