Skip to content

ifelsend/aliyun-oss-adapter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use AliyunOss as Laravel Storage

Latest Stable Version Total Downloads Latest Unstable Version License

Aliyun oss driver for Laravel5.0+, also support flysystem adapter.

inspire by orzcc/aliyun-oss

Usage

use Storage;

//...

Strorage::[everything in doc]

more infomation 更多信息:

Laravel wiki

Aobo's wiki

Installation

This package can be installed through Composer.

composer require aobozhang/aliyun-oss-adapter

Configuration

This service provider must be registered.

// config/app.php

'providers' => [
    ...,
    Aobo\OSS\AliyunOssFilesystemServiceProvider::class,
];

add config:

// config/filesystem.php.

        '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'),  
            		// eg. oss-cn-beijing.aliyuncs.com !!without 'http://' in OSS SDK 2.0+
        ],

change default to oss

'default' => 'oss';

About

User Aliyun OSS as Laravel Storage / Flysystem

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%