larva/laravel-flysystem-qiniu

This is a Flysystem adapter for the Qiniu.

1.0.3 2021-08-08 15:08 UTC

This package is auto-updated.

Last update: 2024-10-29 05:16:47 UTC


README

This is a Flysystem adapter for the Qiniu

PHP Composer

Installation

composer require larva/laravel-flysystem-qiniu -vv

for Laravel

This service provider must be registered.

// config/app.php

'providers' => [
    '...',
    Larva\Flysystem\Qiniu\QiniuServiceProvider::class,
];

edit the config file: config/filesystems.php

add config

'qiniu' => [
    'driver'     => 'qiniu',
    'access_key' => env('QINIU_ACCESS_KEY'),
    'secret_key' => env('QINIU_SECRET_KEY'),
    'bucket' => env('QINIU_BUCKET'),
    'prefix' => env('QINIU_PREFIX'), // optional
    'url' => env('QINIU_BUCKET_URL'),
    'visibility' => 'private',
],

change default to oss

    'default' => 'qiniu'

Use

see Laravel wiki