First, your form must be set up to upload files.
<?php echo $form->create(Model, array('type' => 'file')); ?>
This will allow any files to upload the file to your server using $form->file(field)or $form->input(field, array('type' => 'file')).
After downloading the file, you should process everything else from Model:
function beforeSave($created) {
extract($this->data[Model][field]);
if ($size && !$error) {
move_uploaded_file($tmp_name, destination);
$this->data[Model][field] = destination;
}
return true;
}
, , , .