formData
JSON Object
Empty Object
A JSON object containing additional data to send to the server-side upload script. Data sent via this option will be sent via the headers and can be accessed via the $_POST array (if using the ‘post’ method). So if you send something like {‘someKey’ : ‘someValue’}, then you can access it as $_POST[‘someKey’].
Demo
1 |
<input type="file" name="file_upload" id="file_upload" /> |
1 2 3 4 5 6 7 8 9 |
$(function() { $('#file_upload').uploadifive({ 'formData' : {'someKey' : 'someValue'}, 'uploadScript' : '/uploadifive.php', 'onUploadComplete' : function(file, data) { alert(data); } }); }); |