Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Feb 2010
    Posts
    15
    Vote Rating
    5
    samGod is on a distinguished road

      0  

    Default Sending form which includes array and fileupload via Ext.Direct

    Sending form which includes array and fileupload via Ext.Direct


    Hello,

    I am using ext direct to send my form which includes a file upload and an array, view code below..
    The teachers param below is an array.

    Code:
    form.submit({
                    scope:this,
                    params: {
                        teachers: teachers
                    },                
                    success: function(form, action) {     
                        ...
                    },
                    failure: function(form, action) {
                        ...
                    }
    });
    On the server side, instead of seeing the entire teacher array, i only see one element in that array which is basically the last element in the array.

    When i look at the request payload, i see the following:


    ------WebKitFormBoundaryh0uAdAyvvzFFBtvaContent-Disposition: form-data; name="teachers"4

    ------WebKitFormBoundaryh0uAdAyvvzFFBtvaContent-Disposition: form-data; name="
    teachers"7

    ------WebKitFormBoundaryh0uAdAyvvzFFBtvaContent-Disposition: form-data; name="
    teachers"11


    So i have the fealing that the teacher parameter is being overwritten twice. I know that the information is not sent via AJAX but via a form post since the file upload cannot be sent through ajax. Now the problem is that i cannot access the array since its being flattened in the request payload and the last element of the array is assigned to the teacher parameter.

    Is there away to basically send an array in a form which contains a file upload via Ext.Direct and actually get an array on the server side?

    Thank you in advance

  2. #2
    Sencha User
    Join Date
    Feb 2010
    Posts
    15
    Vote Rating
    5
    samGod is on a distinguished road

      0  

    Default


    Solution:
    Forgot to encode it in JSON before sending it

    My bad for not searching enough

Tags for this Thread