Qual é a sua dúvida?
Upload de Arquivos no Cakephp - File Upload
View
echo $this--->Form->create(false, array(
'type' => 'file', // <---- Important
'url' => array(
'admin' => true,
'controller' => 'tab_trees',
'action' => 'upload_json', $this->request->data['TabTree']['id']
)
));
echo $this->Form->input('file', array(
'class' => 'form-control',
'label' => false,
'type' => 'file', // <---- Important
));
echo $this->Form->end(array(
'label' => __('Upload File'),
'class' => 'btn btn-sm btn-primary'
));
Controller
public function admin_upload_json($id = null)
{
debug($this->request->data);
die;
$this->TabTree->id = $id;
if (!$this->TabTree->exists) {
throw new NotFoundException(sprintf(__('Invalid %s'), __('tab tree')));
}
}