Open
Description
opened on Oct 11, 2022
It creates files, but created dir 'filename_dir' has only 700 permissions
` $this->addBehavior('Josegonzalez/Upload.Upload', [
'image' => [
'keepFilesOnDelete' => false,
'transformer' => function ($table, $entity, $data, $field, $settings, $filename) {
$this->patchEntity($entity, [
'filename' => $filename,
]);
return [
$data->getStream()->getMetadata('uri') => $filename,
];
},
'path' => 'webroot{DS}images{DS}{field-value:filename_dir}{DS}',
'deleteCallback' => function (string $path, Image $entity) {
return [
$path . $entity->filename,
];
},
]
]);`
for example. this 6117de6f-dee3-4d1c-b38b-ceee9a8f8534 folder has 700 permission
Metadata
Assignees
Labels
No labels
Activity