1. #1
    Touch Premium Member
    Join Date
    Nov 2011
    Location
    Massachusetts
    Posts
    43
    Vote Rating
    0
    martincf is on a distinguished road

      0  

    Default Unanswered: Large Amount of data to Remote Web Service

    Unanswered: Large Amount of data to Remote Web Service


    Sending a large amount of data to web service from Sencha Touch. Something that allows me to not send it through a query string? Can I send my data through the header instead?

    I have a store setup using 'scripttag' and it works sending data to my web service when I remove some of the data out of my json. I can receive the data and see it in a variable in my web service. When I add the large text block back into my json, it fails with bad request. I plugged my json with all the data in it, into http://jsonlint.com/. It informs me that my json is well formed with the data being sent.

    I'm open to alternate approaches, so here is how it is structured. I have 3 stores that hold offline data until the user is ready to upload the content to the server. It is my header information(similar to an order header), details (similar to items on an order) and a signature (using the signaturePad plugin in floating around on the Sencha Touch forums). I manually build a json record using these three stores. The signature data is raw, so it is a huge string which is the item causing the problem. I want to get that data up to the server where I will convert it to an image there instead of on the device.

    I believe the problem I'm having is related to the allowed size of the querystring. Is there a way to send the data through the header with a large amount of data?

    Martin

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,206
    Answers
    3517
    Vote Rating
    856
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    If you are trying to load on a different domain (cross origin) then you are stuck with scripttag proxy and the params will be url encoded. The JSON must also be wrapped in a callback JS function that is pasted int he callback param.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1