[Task] Fully stream ZIP uploads; current extraction is bounded but the uploaded archive is still buffered up to the configured limit #12

Closed
opened 2026-07-06 12:36:52 +02:00 by zemion · 1 comment
Owner

Imported from the consolidated GovOPlaN product backlog.

  • Source: /mnt/DATA/Nextcloud/ADD ideas UG/Products/govoplan/backlog.md
  • Line: 139
  • Section: Milestones > Milestone 7 - Privacy, Governance, And Security
  • Source status: PARTIAL.

Imported backlog item:

- [ ] Fully stream ZIP uploads; current extraction is bounded but the uploaded archive is still buffered up to the configured limit.

Ownership cleanup note:

  • Moved from: add-ideas/govoplan-campaign#19
  • Reason: ZIP upload streaming belongs with managed file upload/extraction behavior.
  • Native issue transfer was not available on this Gitea instance, so this issue was recreated and cross-linked.
<!-- codex-backlog-fingerprint:f6ff2b7d80b03e0c92257fa7 --> Imported from the consolidated GovOPlaN product backlog. - Source: `/mnt/DATA/Nextcloud/ADD ideas UG/Products/govoplan/backlog.md` - Line: `139` - Section: `Milestones > Milestone 7 - Privacy, Governance, And Security` - Source status: `PARTIAL.` Imported backlog item: ```markdown - [ ] Fully stream ZIP uploads; current extraction is bounded but the uploaded archive is still buffered up to the configured limit. ``` --- Ownership cleanup note: - Moved from: `add-ideas/govoplan-campaign#19` - Reason: ZIP upload streaming belongs with managed file upload/extraction behavior. - Native issue transfer was not available on this Gitea instance, so this issue was recreated and cross-linked.
zemion added this to the Milestone 7 - Privacy, Governance, And Security milestone 2026-07-06 13:23:56 +02:00
Author
Owner

Implemented ZIP upload spooling so incoming ZIP archives are no longer buffered up to the configured archive limit. /upload-zip and unpack_zip ZIP handling now write the request body to a bounded temporary file in chunks, pass the temp path into extraction, and clean it up after extraction/errors. Extraction still enforces max files, per-file size, total extracted size, encrypted ZIP rejection, and path normalization. Added a regression that patches the old full-buffer helper to raise while /upload-zip succeeds. Verification: py_compile for files router and storage/archives; unittest tests.test_api_smoke.ApiSmokeTests.test_zip_upload_spools_archive_instead_of_full_buffering and test_managed_file_runtime_flow; git diff --check.

Implemented ZIP upload spooling so incoming ZIP archives are no longer buffered up to the configured archive limit. /upload-zip and unpack_zip ZIP handling now write the request body to a bounded temporary file in chunks, pass the temp path into extraction, and clean it up after extraction/errors. Extraction still enforces max files, per-file size, total extracted size, encrypted ZIP rejection, and path normalization. Added a regression that patches the old full-buffer helper to raise while /upload-zip succeeds. Verification: py_compile for files router and storage/archives; unittest tests.test_api_smoke.ApiSmokeTests.test_zip_upload_spools_archive_instead_of_full_buffering and test_managed_file_runtime_flow; git diff --check.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: add-ideas/govoplan-files#12
No description provided.