creocoder / yii2-flysystem

The Flysystem integration for the Yii framework.
Other
283 stars 76 forks source link

Local Filesystem defaults write flag LOCK_EX #58

Closed jcord04 closed 1 year ago

jcord04 commented 1 year ago

By default Flysystem League\Flysystem\Adapter\Local sets the write flag to LOCK_EX which does not work with all storage types (e.g. my NFS does not support LOCK_EX).

It would be ideal if these default arguments could be overridden in the Yii2 component, for example;

return [
    //...
    'components' => [
        //...
        'fs' => [
            'class' => 'creocoder\flysystem\LocalFilesystem',
            'path' => '@webroot/files',
            // 'writeFlags' => LOCK_EX,
            // 'linkHandling' => 0002,
            // 'permissions' => [], 
        ],
    ],
];
jcord04 commented 1 year ago

Hi @schmunk42 thanks for merge, are we able to get this published to Packagist?

schmunk42 commented 1 year ago

Just triggered a manual update, since I do not own the package on packagist. You should be able to do this with a packagist account btw.

jcord04 commented 1 year ago

Thanks @schmunk42, all working 👍