jacksunny/ossfs
Composer 安装命令:
composer require jacksunny/ossfs
包简介
aliyun oss adapter for laravel file system 5.2+
README 文档
README
laravel file system plugin based-on aliyun oss,you may use oss as normal laravel file system mode
-
install package composer require "jacksunny/ossfs":"dev-master"
-
append the code below to array "disks" in the file config/filesystems.php
'oss' => [
'driver' => 'oss',
//using innernal network to transfer files,suggest external network for testing,internal network for running
//'internal'=>true,
'internal'=>false,
'key' => env('OSS_KEY','APPKEYAPPKEYAPPK'),
'secret' => env('OSS_SECRET','APPSECRETAPPSECRETAPPSECRETAPP'),
'city'=>'上海',
'networkType'=>'经典网络',
'bucket' => env('OSS_BUCKET','mybucketname'),
],
- now you may use laravel file system to put/get files on aliyun oss
$filename = time().""; $content = "Contents"; $result = Storage::disk('oss')->put($filename, $content); or $result = Storage::disk('oss')->put($filename, $request->file('logo')->getRealPath());
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2017-06-07