0

I'm using the HTML5 version of , called .

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?

sdabet
  • 18,360
  • 11
  • 89
  • 158
pendo
  • 792
  • 2
  • 5
  • 27
  • Note: I was able to get rid of the the error message by setting dnd (drag and drop) setting to false. Hope this helps someone. – pendo Aug 27 '15 at 15:46
  • http://www.uploadify.com/documentation/uploadifive/dnd/ – pendo Aug 27 '15 at 15:46

1 Answers1

0

The option 'queueID' needs to reference a DOM element on page if 'dnd' is set to true.

$('#file_upload').uploadifive({
  auto : false,
  queueID : 'queue',
  dnd: true
});
Bento
  • 37
  • 1
  • 6