phuclh / flysystem-cloudinary
A Laravel flysystem driver for Cloudinary
0.0.2
2022-05-14 06:02 UTC
Requires
- php: ^8.1
- cloudinary/cloudinary_php: ^2.6
- illuminate/contracts: ^9.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- nunomaduro/collision: ^6.0
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpunit/phpunit: ^9.5
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-10-09 04:27:53 UTC
README
A Laravel flysystem driver for Cloudinary
Installation
You can install the package via composer:
composer require phuclh/flysystem-cloudinary
You can publish the config file with:
php artisan vendor:publish --tag="flysystem-cloudinary-config"
Setup
First you will need to sing up for a Cloudinary account. Then go https://cloudinary.com/console to get your url endpoint. Add the following to your .env file:
CLOUDINARY_URL=cloudinary://.....@id
Usage
// Upload file (second argument can be an url, file or base64) Storage::disk('cloudinary')->put('filename.jpg', 'https://mysite.com/my_image.com'); // Get file Storage::disk('cloudinary')->get('filename.jpg'); // Delete file Storage::disk('cloudinary')->delete('filename.jpg'); // List all files Storage::disk('cloudinary')->listContents('', false); // listContents($path, $deep)
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.