businessprocess/file-storage
最新稳定版本:v1.0.0
Composer 安装命令:
composer require businessprocess/file-storage
包简介
File storage disk for Laravel
README 文档
README
File storage to Laravel FrameWork v8.0 and above.
Installation
The recommended way to install channel is through Composer.
composer require businessprocess/file-storage
Usage BptDrive
$config = [ 'url' => env('FILE_STORE_URL'), 'login' => env('FILE_STORE_LOGIN'), 'password' => env('FILE_STORE_PASS'), ]; $storage = new \FileStorage\Drive\BptDrive(new \FileStorage\Http\Client($config)); $file = $storage->add('1', true, $content); $url = $storage->getPublicUrl($file->getHash());
Usage FileStore Facade
$file = \FileStorage\Facades\FileStore::add('1', true, $content); $url = \FileStorage\Facades\FileStore::getPublicUrl($file->getHash());
Usage Storage
$path = 'your-file-path' \Storage::drive('cloud')->put($path, $content, $config); $url = \Storage::drive('cloud')->url($path);
Config
'disks' => [ 'cloud' => [ 'driver' => 'bpt-store', 'group' => '1', 'visibility' => 'public', 'throw' => true, ], ]
Config Voyager
'storage' => [ 'disk' => 'cloud', ],
Available Options
| Option | Description | Default value |
|---|---|---|
| url | API url (required) | null |
| login | Login (required) | null |
| password | Password (required) | null |
Available methods
| Option | Description | Default value |
|---|---|---|
| url | API url (required) | null |
| login | Login (required) | null |
| password | Password (required) | null |
统计信息
- 总下载量: 560
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-29