2017 © Pedro Peláez
 

library flysystem-cloudinary

Cloudinary adapter for Flysystem.

image

enl/flysystem-cloudinary

Cloudinary adapter for Flysystem.

  • Wednesday, February 21, 2018
  • by enl
  • Repository
  • 4 Watchers
  • 14 Stars
  • 7,794 Installations
  • PHP
  • 3 Dependents
  • 1 Suggesters
  • 9 Forks
  • 3 Open issues
  • 7 Versions
  • 18 % Grown

The README.md

Enl\Flysystem\Cloudinary

Build Status Software License Coverage Status, (*1)

This is a Flysystem adapter for Cloudinary API., (*2)

Installation

composer require enl/flysystem-cloudinary '~1.0'

Or just add the following string to require part of your composer.json:, (*3)

{
    "require": {
        "enl/flysystem-cloudinary": "~1.0"
    }
}

Bootstrap

``` php <?php use Enl\Flysystem\Cloudinary\ApiFacade as CloudinaryClient; use Enl\Flysystem\Cloudinary\CloudinaryAdapter; use League\Flysystem\Filesystem;, (*4)

include DIR . '/vendor/autoload.php';, (*5)

$client = new CloudinaryClient([ 'cloud_name' => 'your-cloudname-here', 'api_key' => 'api-key', 'api_secret' => 'You-know-what-to-do', 'overwrite' => true, // set this to true if you want to overwrite existing files using $filesystem->write(); ]);, (*6)

$adapter = new CloudinaryAdapter($client); // This option disables assert that file is absent before calling write. // It is necessary if you want to overwrite files on write as Cloudinary does it by default. $filesystem = new Filesystem($adapter, ['disable_asserts' => true]); ```, (*7)

Cloudinary features

Please, keep in mind three possible pain-in-asses of Cloudinary:, (*8)

  • It adds automatically file extension to its public_id. In terms of Flysystem, cloudinary's public_id is considered as filename. But if you set public_id as 'test.jpg' Cloudinary will save the file as 'test.jpg.jpg'. In order to work it around, you can use PathConverterInterface.
  • It does not support folders creation through the API
  • If you want to save your files using folder you should set public_ids like 'test/test.jpg' and allow automated folders creation in your account settings in Cloudinary dashboard.

Good news!

The library supports Cloudinary Transformations!, (*9)

The Versions

21/02 2018

dev-master

9999999-dev

Cloudinary adapter for Flysystem.

  Sources   Download

MIT

The Requires

 

The Development Requires

21/02 2018

v1.1.1

1.1.1.0

Cloudinary adapter for Flysystem.

  Sources   Download

MIT

The Requires

 

The Development Requires

21/02 2018

dev-CL-29/coveralls-report

dev-CL-29/coveralls-report

Cloudinary adapter for Flysystem.

  Sources   Download

MIT

The Requires

 

The Development Requires

19/01 2018

dev-release/1.1

dev-release/1.1

Cloudinary adapter for Flysystem.

  Sources   Download

MIT

The Requires

 

The Development Requires

19/01 2018

v1.1.0

1.1.0.0

Cloudinary adapter for Flysystem.

  Sources   Download

MIT

The Requires

 

The Development Requires

26/04 2016

v1.0.1

1.0.1.0

Cloudinary adapter for Flysystem.

  Sources   Download

MIT

The Requires

 

The Development Requires

18/12 2015

v1.0.0

1.0.0.0

Cloudinary adapter for Flysystem.

  Sources   Download

MIT

The Requires

 

The Development Requires