Download the PHP package venveo/craft-compress without Composer
On this page you can find all versions of the php package venveo/craft-compress. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package craft-compress
Compress plugin for Craft CMS (4.x-5.x)
Compress exposes a variable within Twig to create zip archives from Asset queries as a native Craft asset itself.
Features
- Compress asset query into a zip file
- Generate "lazy links": will dispatch a queue job to generate archives, if a user clicks a link before the job is completed or started, the asset will be fetched on-demand and the queue job cancelled.
- Compressed archives are stored as Assets themselves, so you may query them just like other assets.
- Retrieve an asset query for the contents of an archive to show what files are contained in it.
- Automatically forces zip files to be regenerated when a dependent asset is deleted or updated in Craft.
Requirements
- Craft CMS 3.x-5.x
- ext-zip PHP extension for creating zip files (also conveniently a Craft requirement)
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require venveo/craft-compress
- In the Control Panel, go to Settings → Plugins and click the “Install” button for Compress.
Configuring Compress
- Compress creates its archives as assets in Craft, so you'll need a place to put them. Create a new volume.
- Click "Settings" next to the plugin in the plugin list and select a storage volume for archives. It's not recommended to use an existing volume. The volume must have URLs in order for the Twig helper to return download links; however, it will function without it and respect your settings and life choices.
Using Compress
Basic Example
Advanced Example
This example gets all assets, groups them by the file type, and then generates a lazy link to download all assets of a particular kind.
Caveats & Limitations
- Consider the Assets created by Compress to be temporary. Don't try to use them in Asset relation fields. set changes, a new archive asset will be created and the prior will not be automatically deleted.
- When you provide a name for your archive, it's a good idea to ensure that name is unique to the files you're zipping up. Failure to do so could result in the file not being cached well and being constantly overwritten.
Brought to you by Venveo
All versions of craft-compress with dependencies
PHP Build Version
Package Version
The package venveo/craft-compress contains the following files
Loading the files please wait ....