fileio / dag-client
iij gio dag client for laravel5
0.0.6
2016-07-15 02:27 UTC
This package is not auto-updated.
Last update: 2024-09-18 19:19:43 UTC
README
Laravel 的 Gio Dag 客户端包 (http://docs.dag.iijgio.com/analysis/library/php.html)
安装
需要库
$ composer require fileio/dag-client:0.0.5
设置
在 config/filesystems.php
下的 disks
中添加 dag
指令
'dag' => [
'driver' => 'dag',
'key' => 'access_key',
'secret' => 'secret_key',
'bucket' => 'bukcet_name',
],
在 config/app.php
下的 providers
中注册提供者
Gio\IijDagClient\Providers\GioServiceProvider::class
在 config/app.php
下的 aliases
中注册 Facade
'GioIijDagClient' => Gio\IijDagClient\Facade\GioIijDagClient::class
多部分文件下载
GioIijDagClient::readStreamAsync($path,
function($data) {
// called everytime data is downloaded from dag
},
function() use (&$finished) {
// called when download finishes
}
);