- How do I install and configure the Cloudinary Flysystem adapter in Laravel?
- Require carlosocarvalho/flysystem-cloudinary with Composer, then register the driver using Storage::extend('cloudinary', ...) in a service provider and add a cloudinary disk to config/filesystems.php. Pull your cloud name, API key, and API secret from environment variables and confirm the package's Composer constraints match your Laravel and PHP versions. After that you can use Storage::disk('cloudinary') like any other disk.
- Can I use Laravel's Storage facade with Cloudinary instead of writing SDK calls?
- Yes. The adapter is a Flysystem v3 driver, so once registered it plugs into Laravel's Storage facade and exposes put, get, exists, delete, and listContents through the standard contract. That keeps Cloudinary-specific code out of controllers and jobs for simple upload-and-serve flows. Remember Cloudinary is a media platform, not a general-purpose filesystem, so avoid pointing logs, exports, or backups at it.
- How does the adapter map Flysystem paths to Cloudinary public_id, format, and resource_type?
- Flysystem assumes a flat keyspace where slashes act as folders and keys usually include an extension, while Cloudinary stores a public_id plus a separate format and a resource_type/type pair. A naive bidirectional conversion is a round-trip hazard, so verify that write, listContents, and delete agree on the same mapping for files with extensions. Also check whether listings surface resource_type and type, since hiding them makes reads and deletes ambiguous.
- Does Storage::disk('cloudinary')->url() return transformed, resized, or optimized Cloudinary URLs?
- Flysystem's url() contract returns a plain string and has no place for transformation parameters, so expect a base delivery URL rather than automatic resizing, quality, or format conversion. Transformation-on-URL is Cloudinary's core delivery mechanism, but it sits outside the Flysystem contract. If your app depends on on-the-fly variants, plan a thin Cloudinary-aware wrapper instead of relying solely on Storage.
- Which Laravel and PHP versions does flysystem-cloudinary support?
- The intended envelope is Laravel 9 through 11 with Flysystem 3 and PHP 8.1 or newer, but the supplied material shows no declared CI matrix or explicit framework bounds. Inspect the package's composer.json for laravel/framework, league/flysystem, and cloudinary/cloudinary_php constraints before upgrading. Run a smoke test on your exact target version rather than assuming support because it installs.
- How is deleteDirectory implemented on Cloudinary, and is it safe in production?
- Cloudinary has no real folders, so directory deletion is typically implemented with something like delete_resources_by_prefix, which affects every asset under that prefix. That makes it powerful and easy to misfire on a shared or broad prefix. Confirm whether the behavior is opt-in or guarded, and never run destructive jobs against production prefixes without a dry run.
- Does listContents call the Cloudinary Admin API, and how are pagination and rate limits handled?
- listContents generally needs the Admin API, which is paginated and rate limited, so listing a prefix with thousands of assets can be slow and can consume your API quota. Ask how pagination is handled and whether results can be cached. Avoid listContents in hot request paths and prefer queued jobs or a cached index for large media libraries.
- Is carlosocarvalho/flysystem-cloudinary actively maintained, or should I use the Cloudinary SDK or S3 instead?
- Maintenance signals are thin: a single-vendor namespace, a low star count, and a release date that should be verified against Packagist and the repo tags. There is no visible CI matrix or Flysystem contract-test suite, so treat packaging quality as a starting point rather than a guarantee. The adapter fits when you want Cloudinary media behind Laravel's Storage facade; for generic blobs S3 or a local disk is simpler, and for transformation-heavy work you will likely call the Cloudinary SDK directly.
- Are there tests, and does the adapter pass the Flysystem adapter contract test suite?
- The league/flysystem-adapter-test-utilities harness is the standard way to prove a driver honors the Flysystem v3 contract, and the supplied material shows no evidence it is run here. Before adopting, look for a CI badge, a tests directory, and documented skipped tests with reasons. If none exist, budget time to write your own integration tests against a dedicated Cloudinary test account.
- How are move, copy, and visibility handled, and does the adapter generate signed or private URLs?
- Cloudinary has no POSIX permissions, so visibility maps at best to upload type, while move and copy may be a native rename or a copy-plus-delete. Check whether the adapter implements Flysystem's PublicUrlGenerator and TemporaryUrlGenerator so signed or private delivery URLs surface correctly. For authenticated assets, confirm how Cloudinary signed URLs are produced before designing access control around the disk.