I'm using the HTML5 version of uploadify, called uploadifive.
I'm following the instructions to the letter and I'm getting the following error message:
Uncaught TypeError: Cannot read property 'addEventListener' of undefined
I'm using the latest version of Chrome.
<?php $timestamp = time();?>
$(function() {
$('#file_upload').uploadifive({
'auto' : false,
'checkScript' : 'check-exists.php',
'formData' : {
'timestamp' : '<?php echo $timestamp;?>',
'token' : '<?php echo md5('unique_salt' . $timestamp);?>'
},
'queueID' : 'queue',
'uploadScript' : '<?php echo base_url('/Kb/upload_file'); ?>',
'onUploadComplete' : function(file, data) { console.log(data); console.log(file); }
});
});
When I use the non-minified version I track the error message to line 631 of the uploadifive.js script:
$dropTarget.addEventListener('dragleave', function(e) {
// Stop FireFox from opening the dropped file(s)
e.preventDefault();
e.stopPropagation();
}, false);
Any thought?
The option 'queueID' needs to reference a DOM element on page if 'dnd' is set to true.