dansmaculotte / flysystem-cloudinary
Flysystem adapter for Cloudinary
v3.0.2
2022-06-06 12:58 UTC
Requires
- php: ^8.0
- cloudinary/cloudinary_php: ^2.6
- league/flysystem: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.7
- mockery/mockery: ^1.4
- phpunit/php-code-coverage: ^9.2
- phpunit/phpunit: ^9.5
- symfony/var-dumper: ^6.0
- vimeo/psalm: ^4.22
- vlucas/phpdotenv: ^5.4
This package is auto-updated.
Last update: 2024-11-06 18:10:27 UTC
README
This project is a league/flysystem adapter for Cloudinary, forked from https://github.com/carlosocarvalho/flysystem-cloudinary
Install
composer require dansmaculotte/flysystem-cloudinary
Example
use DansMaCulotte\Flysystem\Cloudinary\CloudinaryAdapter as Adapter; $config = [ 'api_key' => ':key', 'api_secret' => ':secret', 'cloud_name' => ':name', ]; $container = new Adapter($config); $filesystem = new League\Flysystem\Filesystem( $container );
List contents and others actions use Filesystem api
$filesystem->listContents()
Run tests
Tests actually use Cloudinary to run. Copy .env.example
to .env
and set your api key, secret and cloud name. Then run:
composer test
Alternatively, you can export following variables before running the tests:
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
CLOUDINARY_CLOUD_NAME=