承接 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

统计信息

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

GitHub 信息

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

其他信息

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