liuchengguos / aliyun-oss-adapter
Use Aliyun oss as Storage for Laravel 5.0+
dev-master
2016-11-18 13:53 UTC
Requires
- php: >=5.4.0
- aliyuncs/oss-sdk-php: ~2.0.4
- league/flysystem: ~1.0
Suggests
- laravel/framework: 5.1.*
This package is not auto-updated.
Last update: 2024-11-18 13:57:52 UTC
README
Aliyun oss driver for Laravel5.0+, also support flysystem adapter.
Usage
$request->file("image")->store("test"); //...
more infomation 更多信息:
Installation
This package can be installed through Composer.
composer require liuchengguos/aliyun-oss-adapter
Configuration
This service provider must be registered.
// config/app.php 'providers' => [ ..., Liuchengguos\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';