dansmaculotte/flysystem-cloudinary

Flysystem adapter for Cloudinary

v3.0.2 2022-06-06 12:58 UTC

This package is auto-updated.

Last update: 2024-04-06 16:56:15 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=

For use in laravel

Access this repository