Download the PHP package yilu-tech/file-center without Composer
On this page you can find all versions of the php package yilu-tech/file-center. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package file-center
Yilu-Tech file-center
文件管理服务
安装
安装包
composer require yilu-tech/file-center
注册provider
// 服务端 route provider
YiluTech\FileCenter\FileServiceProvider::class
// 内网客户端 client provider, 使用 facade 需注入
YiluTech\FileCenter\FileClientServiceProvider::class
// 如果使用 OSS
YiluTech\FileCenter\AliyunOss\AliyunOssServiceProvider::class
服务端配置
// 在 filesystems.php 添加 buckets
// 例:
"buckets" => [
$bucket => [ // $bucket bucket名称
"disk" => "oss", // 磁盘驱动
"root" => "dev" // root目录
} ...
]
内网客户端配置
// .env
FILE_CENTER_BUCKET=$bucket
FILE_CENTER_URI_PREFIX= // 链接前缀
实例
服务端
内网客户端
try {
\DB::beginTransaction();
\FileCenterClient::prefix($prefix)->prepare();
\DB::table('xx')->insert([...]);
\FileCenterClient::move('$temp/2018-01-01/xxx.png');
\FileCenterClient::delete('xxx.png');
\FileCenterClient::commit(); // 在数据库之前 commit
\DB::commit();
} cache(\Exception $exception) {
\DB::rollback();
\FileCenterClient::rollback(); // 在数据库之后 rollback
}
All versions of file-center with dependencies
PHP Build Version
Package Version
No informations.
The package yilu-tech/file-center contains the following files
Loading the files please wait ....