定制 businessprocess/file-storage 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

businessprocess/file-storage

最新稳定版本:v1.0.0

Composer 安装命令:

composer require businessprocess/file-storage

包简介

File storage disk for Laravel

README 文档

README

PHP 8.x Laravel 8.x Yii 2.x Latest Stable Version Release date Release Version Total Downloads Pull requests Software License Stars

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

统计信息

  • 总下载量: 813
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-29