Closed marquesferreira closed 8 years ago
i saw jose diaz talking about -> $currentName to get image filetype (.jpg,.png), but i don't have access to this variable...
how i can do it please? Where is this variable? show me the magic?
public function filename() { $processor = Hash::get($this->settings, 'nameCallback', null); if (is_callable($processor)) { return $processor($this->data, $this->settings); } debug($this->data['name']); return $this->data['name']= $this->filerename($this->data); } public function filerename($data) { return $this->data['name'] = "a_lot_of_work_to_rename".".jpg"; }
You can use the finfo_file to retrieve that information from a file.
finfo_file
i saw jose diaz talking about -> $currentName to get image filetype (.jpg,.png), but i don't have access to this variable...
how i can do it please? Where is this variable? show me the magic?