定制 jasirilabs/flysystem-cloudinary 二次开发

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

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

jasirilabs/flysystem-cloudinary

Composer 安装命令:

composer require jasirilabs/flysystem-cloudinary

包简介

Flysystem Adapter for the Cloudinary v2 API

README 文档

README

Flysystem Adapter for Cloudinary API

Latest Version on Packagist Total Downloads GitHub Actions

The package contains a flysystem adapter for cloudinary. Under the hood Cloudinary PHP SDKis used.

Disclaimer

This package is still under active development but fill free to try out leave a PR or file an issue incase of any challenge

Installation

You can install the package via composer:

composer require jasirilabs/flysystem-cloudinary

Usage

Then follow the steps on using custom filesystem with laravel.

Quick Start

FILESYSTEM_DISK=
CLOUDINARY_NAME=
CLOUDINARY_KEY=
CLOUDINARY_SECRET=

Add cloudinary disk in filesystem.php

		... 
	'disk' => 
	[
		...

		   'cloudinary' => [
            'driver' => 'cloudinary',
            'name' => env('CLOUDINARY_NAME'),
            'key' => env('CLOUDINARY_KEY'),
            'secret' => env('CLOUDINARY_SECRET'),
	]

Add the following on boot method of AppServiceProvider.php file

Storage::extend('cloudinary', function ($app, $config) {

            $configuration = new Configuration();
            $configuration->cloud->cloudName = $config['name'];
            $configuration->cloud->apiKey = $config['key'];
            $configuration->cloud->apiSecret = $config['secret'];
            $configuration->url->secure = true;

            $cloudinary = new Cloudinary($configuration);
            $adapter = new CloudinaryAdapter($cloudinary);

            return new FilesystemAdapter(
                new Filesystem($adapter, $config),
                $adapter,
                $config
            );
        });

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email hello@brunoalfred.me instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

PHP Package Boilerplate

This package was generated using the PHP Package Boilerplate by Beyond Code.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-03-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固