Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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(); ?>');
});
 
PREVIOUS NEXT
Tagged: #dropzone #csrf #codeigniter
ADD COMMENT
Topic
Name
4+8 =