I think you are using an old version of ajax-upload. I found this new one .
Here is an example of working with OK with the data attribute correctly converted to hidden input fields: http://jsfiddle.net/marcosfromero/XkCP5/
var button = $('#button1'), interval; new AjaxUpload(button,{ //action: 'upload-test.php', // I disabled uploads in this example for security reasons action: 'upload.htm', --> data: {field1: 'value1', field2: 'value2'}, <-- ...
I stopped submitting the file and got this automatically generated form:
<form enctype="multipart/form-data" method="post" style="display: none;" action="upload.htm" target="ValumsAjaxUpload0"> <input type="hidden" name="field1" value="value1"> <input type="hidden" name="field2" value="value2"> <input type="file" name="myfile" style="position: absolute; margin: -5px 0pt 0pt -175px; padding: 0pt; width: 220px; height: 30px; font-size: 14px; opacity: 0; cursor: pointer; display: block; z-index: 2147483583; top: 48px; left: 147px;"> </form>
marcosfromero
source share