With a successful upload from the blueimp fileupload plugin, the forms other data is submitted as well, however, the json data response I'm receiving from Firebug shows response to each input field is truncated to just one character (byte?). Is this the expected response? I am using jQueryMobile and Blueimp fileupload plugin. Please see specifics:
var formData = $('#uploadform'); console.log( formData.serializeArray() );
Result from console.log
[Object { name="image_name", value="Don"}, Object { name="image_description", value="Testing"}, Object { name="image_keywords", value="Musician Actor Artists"}, Object { name="image_nudity", value="0"}, Object { name="cat_id", value="42"}, Object { name="action", value="uploadimage"}]
POST Response from blueimp fileuploadsubmit
{"files":[{"name":"image2.jpeg","size":114688,"type":"image/jpeg","cat_id":"4","image_name":"D","image_nudity":"","image_description":"T","image_keywords":"M","action":"u","example":"","user_id":"2","url":"../models/data/tmp_media/image2.jpeg","thumbnailUrl":"../models/data/tmp_media/thumbnail/image2.jpeg","deleteUrl":"http://myfame/mobile/?file=image2.jpeg","deleteType":"DELETE"}]}
Here's the code from UploadHandler.php
protected function handle_form_data($file, $index) {
global $user_info;
$file->cat_id = (empty($_REQUEST['cat_id'][$index])) ? "" : $_REQUEST['cat_id'][$index];
$file->image_name = (empty($_REQUEST['image_name'][$index])) ? "" : $_REQUEST['image_name'][$index];
$file->image_nudity = (empty($_REQUEST['image_nudity'][$index])) ? "" : $_REQUEST['image_nudity'][$index];
$file->image_description = (empty($_REQUEST['image_description'][$index])) ? "" : $_REQUEST['image_description'][$index];
$file->image_keywords = (empty($_REQUEST['image_keywords'][$index])) ? "" : $_REQUEST['image_keywords'][$index];
$file->action = (empty($_REQUEST['action'][$index])) ? "" : $_REQUEST['action'][$index];
$file->example = (empty($_REQUEST['example'][$index])) ? "" : $_REQUEST['example'][$index];
$file->user_id = $user_info['user_id'];
Note the discrepancy of the submitted data and response truncating the inputs to one character, any ideas on how this can be fixed, or is this a bug?