Improve user experience when downloading archives#59049
Open
salmart-dev wants to merge 2 commits intomasterfrom
Open
Improve user experience when downloading archives#59049salmart-dev wants to merge 2 commits intomasterfrom
salmart-dev wants to merge 2 commits intomasterfrom
Conversation
10 tasks
…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>
a9a469d to
6e8ee13
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_filestotrue(defaultfalse) inconfig.phpadministrators 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.jsoninside the archive itself, giving the user some minimal information about why the files are missing.Why is this needed
The
ZipFolderPlugincurrently 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 acontent-lengthheader, 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
missing_files.jsoncontaining an entry for the blocked filemissing_files.jsonreporting the issuemissing_files.jsonreporting the reasonNote: this will need to be backported down to stable29
TODO
deepdiver/zipstreamerto avoid slow tests due to loss of precisionChecklist
3. to review, feature component)stable32)AI (if applicable)