Here is my entire code base for trying to get this to work
$('#plupload').pluploadQueue({
runtimes : 'flash, html5',
url : '/admin/upload/do_upload/',
filters : [
{title : "Image Files", extensions : "jpg,gif,png"}
],
flash_swf_url : "/js/admin/plupload/plupload.flash.swf"
});
$('form').submit(function(e) {
alert('EHY');
var uploader = $('#plupload').pluploadQueue();
// Validate number of uploaded files
if (uploader.total.uploaded == 0) {
// Files in queue upload them first
if (uploader.files.length > 0) {
// When all files are uploaded submit form
uploader.bind('UploadProgress', function() {
if (uploader.total.uploaded == uploader.files.length)
$('form').submit();
});
uploader.start();
uploader.bind('Error', function(error){
console.log(error);
});
} else
alert('You must at least upload one file.');
e.preventDefault();
}
});