Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cesarockstar1985/2d8488d3f1f9204ad29b0b28663ae94c to your computer and use it in GitHub Desktop.
Save cesarockstar1985/2d8488d3f1f9204ad29b0b28663ae94c to your computer and use it in GitHub Desktop.
// CouplesTable.php
$this->addBehavior('Josegonzalez/Upload.Upload', [
'photo' => [
'fields' => [
// 'dir' => Configure::read('Media.basePath'), // defaults to `dir`\
'dir' => 'photo_dir', // defaults to `dir`
'size' => 'photo_size', // defaults to `size`
'type' => 'photo_type', // d
]
],
]);
// add.php
echo $this->Form->control('photo', ['type' => 'file']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment