larva/laravel-flysystem-aliyun-oss

This package is abandoned and no longer maintained. The author suggests using the larva/laravel-flysystem-oss package instead.

This is a Flysystem adapter for the Aliyun OSS.

1.1.0 2019-09-16 07:47 UTC

This package is auto-updated.

Last update: 2020-03-15 06:57:27 UTC


README

This is a Flysystem adapter for the Aliyun OSS

Installation

composer require larva/flysystem-aliyun-oss

for Laravel

This service provider must be registered.

// config/app.php

'providers' => [
    '...',
    Larva\Flysystem\AliyunOss\AliyunOssServiceProvider::class,
];

edit the config file: config/filesystems.php

add config

'oss' => [
    'driver'     => 'oss',
    'access_id'  => env('OSS_ACCESS_ID','your id'),
    'access_key' => env('OSS_ACCESS_KEY','your key'),
    'bucket'     => env('OSS_BUCKET','your bucket'),
    'endpoint'   => env('OSS_ENDPOINT','your endpoint'),
    'prefix'     => env('OSS_PREFIX', ''), // optional
],

change default to oss

    'default' => 'oss'

Use

see Laravel wiki