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

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

Andrea Casarella created CB-1592:
------------------------------------

             Summary: 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
    Affects Versions: 2.0.0, 2.1.0
         Environment: Macosx - phonegap 2.1 - xcode
            Reporter: Andrea Casarella


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

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

Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470345#comment-13470345 ] 

Andrew Grieve commented on CB-1592:
-----------------------------------

It's likely that there's something going on with how you're using it, since our mobile-spec tests to test the params functionality of FileTransfer.

In you code snippet, encodeURI(url) raises an eyebrow. Try passing in just url.

Just to confirm, what kind of params does your server require? query params?, headers?, url-form-encoded params (this is what params does)?
                
> 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
>            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

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

Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grieve updated CB-1592:
------------------------------

    Component/s: iOS
    
> 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
>
> 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

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

Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grieve reassigned CB-1592:
---------------------------------

    Assignee: Andrew Grieve
    
> 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

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

Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
     [ 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

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

Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grieve updated CB-1592:
------------------------------

    Priority: Minor  (was: Major)
    
> 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
>            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

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

Posted by "Andrea Casarella (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470381#comment-13470381 ] 

Andrea Casarella commented on CB-1592:
--------------------------------------

I've found the problem. It was a problem on my server.
Sorry.
                
> 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