XF 2.1 Does XF2.1 have a zip function?

Cupara

Well-known member
I'm wanting to utilize a zip function if it exists to automatically zip up files and folders when someone clicks download on my site. Any help much appreciated.
 
XF\Service\AddOn\ReleaseBuilder uses the PHP core ZipArchive class - if you look through the code there you can see how they use it as an example.

There is also built in support for Flysystem, which has a ZipArchive Adapter. Look for $container['fs'] for access to the Flysystem filesystem.

Also check out XF\Util\File for more helper functions.
 
Back
Top Bottom