Skip to content

[bug]archive: false — Download icon should trigger download, not open preview in new tab #772

@zhangMonday

Description

@zhangMonday

What happened?

When viewing a non-zipped artifact in the Actions UI, clicking the download icon (⬇️) opens the file in a new browser tab as a preview, instead of triggering a direct file download.

Clicking the filename also opens a new tab preview — so both actions behave identically. There is currently no way to directly download a single file without right-clicking → "Save As".

What did you expect to happen?

The two click targets should have distinct behaviors:

  • Click the filename → Open a new tab to preview the file in the browser (current behavior, this is fine)
  • Click the download icon → Directly download the file (should respond with Content-Disposition: attachment)

This is consistent with how most file management UIs work (Google Drive, GitHub code browser, OneDrive, etc.) — the icon downloads, the name previews.

How can we reproduce it?

​```yaml
name: Reproduce download behavior
on: workflow_dispatch
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Create a text file
run: echo "hello world" > result.txt

  - name: Upload with archive false
    uses: actions/upload-artifact@v7
    with:
      name: test-download
      path: result.txt
      archive: false

​```

Steps:

  1. Run this workflow
  2. Go to the workflow run page → click into the artifact
  3. Click the download icon next to the file
  4. Observe: it opens a new tab showing the file content, instead of downloading

Anything else we need to know?

This is a UX improvement for the new archive: false feature. With zipped artifacts, clicking always triggers a .zip download, so the distinction didn't matter before. But now that individual files are browsable, users need a clear way to distinguish between "preview" and "download".

What version of the action are you using?

v7.0.0

What are your runner environments?

linux

Are you on GitHub Enterprise Server? If so, what version?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions