/**
  * Before filter callback,
  * disable CSFR security check to avoid security error
  *
  * @return void
  */
 function beforeFilter()
 {
     parent::beforeFilter();
     $this->Security->validatePost = false;
     $this->Security->csrfCheck = false;
     $this->uploads_path = WWW_ROOT . $this->uploads_dir;
     $cfg = Configure::read('Nodeattachment');
     $types = explode(',', $cfg['types']);
     $types = array_combine($types, $types);
     $this->set(compact('types'));
 }
 /**
  * Before filter callback,
  * disable CSFR security check to avoid security error
  *
  * @return void
  */
 function beforeFilter()
 {
     parent::beforeFilter();
     $this->Security->validatePost = false;
     $this->uploads_path = WWW_ROOT . $this->uploads_dir;
 }