PHP code example of phuclh / flysystem-cloudinary
1. Go to this page and download the library: Download phuclh/flysystem-cloudinary library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phuclh / flysystem-cloudinary example snippets
// 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)
bash
php artisan vendor:publish --tag="flysystem-cloudinary-config"