Cupara Well-known member Sep 16, 2019 #1 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.
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.
Sim Well-known member Sep 16, 2019 #2 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.
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.