Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .ci/run_browser_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,10 @@ TESTS_MODE=tablet vendor/bin/phpunit -c tests/Browser/phpunit.xml --fail-on-warn
# Mobile mode tests are unreliable on Github Actions
# echo "TESTS_MODE: PHONE"
# TESTS_MODE=phone vendor/bin/phpunit -c tests/Browser/phpunit.xml --fail-on-warning --fail-on-risky --display-deprecations --exclude-group=failsonga-phone

# Only run tests for ZipStream if it's supported - 64-bit PHP
if php -r 'exit(PHP_INT_SIZE >= 8 ? 0 : 1);'; then
echo "TESTS_MODE: DESKTOP with zipstream"
composer require $COMPOSER_ARGS -n 'maennchen/zipstream-php:^3.0'
TESTS_MODE=desktop vendor/bin/phpunit -c tests/Browser/phpunit.xml --fail-on-warning --fail-on-risky --display-deprecations plugins/zipdownload/tests/Browser
fi
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
run: |
composer require "kolab/net_ldap3:~1.1.1" --no-update
composer require "laravel/dusk:^8.3" --no-update
composer require "maennchen/zipstream-php:^3.0" --no-update

- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
"suggest": {
"ext-sodium": "Support EdDSA (Ed25519) signatures (OAuth)",
"bjeavons/zxcvbn-php": "^1.0 required for Zxcvbn password strength driver",
"kolab/net_ldap3": "~1.1.4 required for connecting to LDAP"
"kolab/net_ldap3": "~1.1.4 required for connecting to LDAP",
"maennchen/zipstream-php": "^3.0 optional for larger zip support in zipdownload plugin"
},
"repositories": [
{
Expand Down
12 changes: 12 additions & 0 deletions plugins/zipdownload/README
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ Requirements
============
* php_zip extension (including ZipArchive class)

Optional
========
* maennchen/zipstream-php version 3.x (64-bit only)

With this optional package installed, emails will be streamed directly
from the storage backend, compressed in chunks, and sent to the web client
without using any temporary disk space. The zipdownload_selection config
setting may be increased significantly if desired.

Without this optional package, temporary disk space equal to about 130% of
the zipdownload_selection setting might be used when emails are downloaded.

License
=======
This plugin is released under the GNU General Public License Version 3
Expand Down
3 changes: 2 additions & 1 deletion plugins/zipdownload/config.inc.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ $config['zipdownload_attachments'] = 1;
// Zip selection of mail messages
// This option enables downloading of multiple messages as one zip archive.
// The number or string value specifies maximum total size of all messages
// in the archive (not the size of the archive itself).
// in the archive (not the size of the archive itself). Please see the
// README file for more details before making large changes to this limit.
$config['zipdownload_selection'] = '50MB';

// Charset to use for filenames inside the zip
Expand Down
Loading