bobmulder on master
Use 'fields' from CreatedBy or … (compare)
martonmiklos on master
Fix null pointer exception in W… (compare)
//if (!is_dir($this->_getPath($entity, $field, ['root' => false, 'file' => false]))) {
if(!file_exists($this->_getPath($entity, $field, ['root' => false, 'file' => false]))){
$this->_mkdir($this->_getPath($entity, $field, ['root' => true, 'file' => false]), 0777, true);
}
mkdir
should create the dir right?
$this->addBehavior('Utils.Uploadable', [
'avatar' => [
'path' => '{ROOT}{DS}{WEBROOT}{DS}files{DS}{model}{DS}avatar{DS}{field}{DS}',
'fields' => [
'fileName' => 'avatar'
]
]
]);
But as this is not working, I would suggest you check it as it seems to be a bug to me. The docs say: fileName - this column contains the name of the file. For example: myFile.png. -> but the whole path is saved.