Skip to content

[Enhancement] ZipFolderPlugin fails silently on errors #58825

@salmart-dev

Description

@salmart-dev

Summary

The ZipFolderPlugin can fail producing an archive for different reasons. Some examples:

  • One of the storages for files uses network and the connection cannot be opened or is lost during transfer
  • Files or folders are not readable for the user due to ACLs
  • Any exception happens while the files are being streamed or their metadata is read from the Database (e.g. because of a temporary database issue)

Due to the nature of the plugin, and the fact it is not using the Content-Length header, once the archive's headers are sent and its content has started streaming, if an error occurs it is not possible to stop the transfer and inform the browser that the transfer was aborted. Instead, the browser will see that the transfer ended and the file is written to disk normally.

The above results in the user getting a possibly big archive, leading them to think that the download succeeded, but did not.

The plugin needs to be able to deal with temporary failures and attempt producing a mostly-correct archive, eventually informing the user that files are missing.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions