为 Yii 框架提供的 Flysystem AliyunOss 适配器

dev-master 2019-01-26 01:25 UTC

This package is auto-updated.

Last update: 2024-09-26 14:03:48 UTC


README

为 Yii 框架提供的 Flysystem AliyunOss 适配器

安装

$ composer require jimchen/yii2-flysystem-aliyun-oss -vvv

用法

按照以下方式配置应用程序组件

return [
    //...
    'components' => [
        //...
        'ossFs' => [
            'class' => 'jimchen\flysystem\AliyunOssFilesystem',
            'key' => 'your-key',
            'secret' => 'your-secret',
            'bucket' => 'your-bucket',
            'endpoint' => 'http://my-custom-url',
            // 'isCName' => false,
            // 'securityToken' => null,
            // 'requestProxy' => null,
            // 'prefix' => 'your-prefix',
            // 'options' => [],
        ],
    ],
];

有关 AliyunOss 配置的更多信息,请参阅 此处

关于可用的 options,您可以参考 仓库 了解更多。

许可协议

MIT