How i can access from within a controller the allowed file types I setted in rules like this :
<?php
public function rules()
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('name','file','allowEmpty'=>false,'types'=>'jpg,jpeg,bmp,png,gif,zip','wrongType'=>'Wrong file type !'
...........
?>
I would put this array in the model thus model related things should be stored directly in it.
<?php
public $allowed_types = array('jpg','jpeg','bmp','png','gif');
public function rules()
{
return array(
array('name','file','allowEmpty'=>false,'types'=>$this->allowed_types,'wrongType'=>'Wrong file type !'
);
}
?>