Skip to content

700 permission in subfolder using 'path' #589

Open
@pawel-sz

Description

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,
                    ];
                },
            ]
        ]);`

1

for example. this 6117de6f-dee3-4d1c-b38b-ceee9a8f8534 folder has 700 permission
2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions