Skip to content

Improve user experience when downloading archives#59049

Open
salmart-dev wants to merge 2 commits intomasterfrom
feat/zipfolderplugin-error-handling
Open

Improve user experience when downloading archives#59049
salmart-dev wants to merge 2 commits intomasterfrom
feat/zipfolderplugin-error-handling

Conversation

@salmart-dev
Copy link
Contributor

@salmart-dev salmart-dev commented Mar 18, 2026

Took over some of the changes from #57335, thanks @Koc

Summary

This PR adds an alternative working mode to the ZipFolderPlugin.

By setting the new archive_report_missing_files to true (default false) in config.php administrators can allow users to download partial archives when those contain a file that is blocked or missing/corrupted files.

The users will be informed of this via the addition of a missing_files.json inside the archive itself, giving the user some minimal information about why the files are missing.

Why is this needed

The ZipFolderPlugin currently halts the streaming of an archive for download due to various factors, such as storage issues with a file, temporary database problems, or a lost network connection. Because the plugin streams without a content-length header, the user receives an incomplete archive without any warning. In some cases, this issue only becomes apparent when attempting to open a file in the archive and discovering that the entire archive is corrupted.

What changes

Behaviour Before After
Downloading a directory containing a blocked file Whole download denied Download possible with missing_files.json containing an entry for the blocked file
Downloading a directory with an unstable file backend Corrupted archive Valid archive with partial files and entry in missing_files.json reporting the issue
Downloading a directory with files that cannot be opened because of X Corrupted archive Valid archive with missing file and entry in missing_files.json reporting the reason

Note: this will need to be backported down to stable29

TODO

  • Write tests
  • Translations
  • Update documentation where needed
  • May need a patch to deepdiver/zipstreamer to avoid slow tests due to loss of precision

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@salmart-dev salmart-dev changed the title Improve user feedback for downloaded archives Improve user experience when downloading archives Mar 18, 2026
@salmart-dev salmart-dev self-assigned this Mar 18, 2026
@salmart-dev salmart-dev added the 2. developing Work in progress label Mar 18, 2026
@salmart-dev salmart-dev added this to the Nextcloud 34 milestone Mar 18, 2026
Koc and others added 2 commits March 18, 2026 18:47
…wnload folder with non-downloadable files

Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
@salmart-dev salmart-dev force-pushed the feat/zipfolderplugin-error-handling branch from a9a469d to 6e8ee13 Compare March 18, 2026 17:48
@salmart-dev salmart-dev marked this pull request as ready for review March 18, 2026 17:49
@salmart-dev salmart-dev requested a review from a team as a code owner March 18, 2026 17:49
@salmart-dev salmart-dev requested review from Altahrim, ArtificialOwl, icewind1991 and leftybournes and removed request for a team March 18, 2026 17:49
@salmart-dev salmart-dev added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] ZipFolderPlugin fails silently on errors

2 participants