From 11c039ed3f0dc2ecc5eb30512b3dafa647fc4520 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Tue, 8 Sep 2026 03:04:49 +0200 Subject: feat(hub): cap a directory zip at 512 MB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An arbitrary ceiling, not a technical one: the zip writer streams and holds one chunk plus a record per file, so it would happily produce a hundred gigabytes. Past half a gigabyte the honest answer is a subfolder at a time, or the files individually. Enforced in file-utils.js's downloadDirectory, which is the one implementation behind every zip button — Files' single folder, Files' multi-folder selection, and the Photos album button (docs/photos.md §3). - Per directory, not per selection: Files zips a whole multi-directory selection in one click, so an oversized folder is refused and its siblings still download. - Before _openDownloadTarget, so no save dialog opens for an archive that is never going to be written. - The bound is strict, so a folder of exactly 512 MB still goes through. - Counted in the 1024-based units formatSize already prints, so the number in the refusal is the number in the constant. group.zip_too_large in all ten catalogues. test_zip_size_limit.py runs the module under Node and pins the refusal, the inclusive bound, and that nothing is asked or started when a folder is over. The user guide's "a 40 GB folder costs 40 GB of disk" is no longer true and now documents the cap instead. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01V8EDjk6pkYZrCbo63m2x87 --- packages/meshbay-hub/src/meshbay_hub/static/locales/de.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'packages/meshbay-hub/src/meshbay_hub/static/locales/de.js') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js index e5febde..97a835d 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js @@ -593,6 +593,9 @@ export default { 'group.zip_no_stream': 'Dieser Browser kann einen Download nicht direkt auf die ' + 'Festplatte schreiben, daher muss {name} ({size}) zuerst im Arbeitsspeicher ' + 'aufgebaut werden. Bei einem großen Archiv kann das fehlschlagen. Fortfahren?', + 'group.zip_too_large': '„{name}“ ist {size} groß, und ein Ordner lässt sich nur bis {limit} als ' + + 'Zip herunterladen. Nehmen Sie einen Unterordner nach dem anderen oder die ' + + 'Dateien einzeln.', 'group.rmdir': 'Ordner löschen', 'group.rmdir_confirm': 'Den Ordner „{name}“ löschen? Er muss leer sein.', 'group.rmdir_not_empty': 'Dieser Ordner ist nicht leer. Löschen Sie zuerst seinen ' -- cgit v1.2.3