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