.dropzone codeigniter passing csrf token code example

Example: dropzone csrf codeigniter

var myDropzone = new Dropzone("div#mydropzone", {
  url: "/controller/method_receive_files",
  sending: function (file, xhr, formData) {
    formData.append('<?php echo $this->security->get_csrf_token_name(); ?>', '<?php echo $this->security->get_csrf_hash(); ?>');
  }
}); 
//OR...
myDropzone.on('sending', function(file, xhr, formData) {
  formData.append('<?php echo $this->security->get_csrf_token_name(); ?>', '<?php echo $this->security->get_csrf_hash(); ?>');
});