Skip to content

Text preview: show download/open link for same-origin files too #482

Description

@pierres

The 2.x text-preview template added a download link (<a target="_blank">) for cross-origin files, but hides it for same-origin files. It would be useful to always show this link regardless of origin.

For users with local storage, there's currently no way to open the raw text file in a new tab or download it directly. The expand/collapse toggle is helpful but insufficient for larger files (e.g. log files) — users want to:

  • Open the file in a separate tab for full-screen reading and browser search (Ctrl+F)
  • Download the file

The link could be shown alongside the expand toggle rather than as an alternative to it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions