Sorry, we don't support your browser.  Install a modern browser

`$files->zip()` method to quickly generate a downloadable ZIP#288

For example on press or product pages, there is sometimes the use-case to provide a download link for a ZIP file of a specific set of page files (for example “all images of the press release”, “all documentation of a specific product”…).

There could be a new method for the $files collection that would dynamically create a ZIP file with all files in the collection and place that ZIP into the media folder as a cache. The path inside the media folder would contain a hash of the media hashes of all the files inside that to automatically differentiate between different ZIP combinations.

The method would look like this:

$files->zip(string $filename): Kirby\Filesystem\File
a month ago