dropzone csrf codeigniter

JavaScript
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(); ?>');
});
Source

Also in JavaScript: