Download the PHP package codebar-ag/laravel-flysystem-cloudinary without Composer

On this page you can find all versions of the php package codebar-ag/laravel-flysystem-cloudinary. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-flysystem-cloudinary

Latest Version on Packagist Total Downloads run-tests PHPStan Fix PHP code style issues

💡 What is Cloudinary?

Cloudinary is basically a fantastic way to store and serve assets like images or videos. You can upload your full resolution image to Cloudinary, and they handle the optimization for you. The only thing you have to do is to add additional parameters to your url 😉

🛠 Requirements

Package PHP Laravel Flysystem
>v4.0 >8.3 > Laravel 11 > 3.0
>v3.0 >8.2 > Laravel 10 > 3.0
>v2.0 >8.1 > Laravel 9 > 3.0
>v1.0 >8.0 > Laravel 8 > 1.1

⚙️ Installation

You can install the package via composer:

Add the following disk to your filesystem "disks" list in your filesystems.php configuration:

Add the following environment variables to your .env file:

🏗 File extension problem

Let's look at the following example:

This will generate following URL with double extensions:

To prevent this you should store your images without the file extension:

This is now much better:

🪐 How to use with Nova

We have a package for use with Laravel Nova: Laravel Flysystem Cloudinary Nova

🗂 How to use folder prefix

Imagine the following example. We have different clients but want to store the assets in the same Cloudinary account. Normally we have to prefix every path with the correct client folder name. Fortunately, the package helps us here. We can configure a folder in our environment file like this:

Now all our assets will be prefixed with the client_cat/ folder. When we store following image:

It will produce following URL:

In the Media Library it is stored in client_cat/meow and you can retrieve the image with meow:

This should increase the trust to store and retrieve your assets from the correct folder.

🔋 Rate limit gotchas

All files in Cloudinary are stored with a resource type. There are three kinds of it: image, raw and video. For example if we want to check if a video exists, we need to make up to 3 requests. Every type needs to be checked on their own with a separate request.

Keep this in mind because the admin API is rate limited to 500 calls per hour.

The package does check in following sequence:

⚙️ Optional Parameters

Cloudinary has a lot of optional parameters to customize the upload. You can find all options in the official documentation optional parameters section.

You can pass all parameters as an array to the put method:

Note: if you find yourself using the same parameters for all requests, you should consider adding them to the config file. (see below)

🔧 Configuration file

You can publish the config file with:

This is the contents of the published config file:

🚧 Testing

Run the tests:

📝 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.


All versions of laravel-flysystem-cloudinary with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
guzzlehttp/guzzle Version ^7.8
illuminate/contracts Version ^11.0
spatie/laravel-package-tools Version ^1.16
cloudinary/cloudinary_php Version ^2.13
nesbot/carbon Version ^2.72
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package codebar-ag/laravel-flysystem-cloudinary contains the following files

Loading the files please wait ....