-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release downloads should trigger a download #28736
Comments
lunny
pushed a commit
that referenced
this issue
Jan 9, 2024
GiteaBot
pushed a commit
to GiteaBot/gitea
that referenced
this issue
Jan 9, 2024
fuxiaohei
pushed a commit
to fuxiaohei/gitea
that referenced
this issue
Jan 17, 2024
silverwind
pushed a commit
to silverwind/gitea
that referenced
this issue
Feb 20, 2024
project-mirrors-bot-tu bot
pushed a commit
to project-mirrors/forgejo-as-gitea-fork
that referenced
this issue
Jan 23, 2025
…tea#28740) Backport go-gitea#28739 by @JakobDev Fixes go-gitea#28736 Co-authored-by: JakobDev <jakobdev@gmx.de> (cherry picked from commit 12f418a)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Overview
When downloading files from a release that contains files that browsers can open (for example a .hex-file), Gitea does not trigger a download.
Instead, the file is opened in a new tab and when manually saving the content, the file type is not preserved and is instead suggested to be saved as .txt.
Expected behavior
When clicking to download a file from a release, Gitea should set the proper headers to ensure that the browser will suggest to save it with the same filename and extension as in the released file.
This works as expected when clicking the Download-button in the Code view.
Example
Reproduced on the demo site: https://try.gitea.io/AsgeirSH/DownloadFileIssueRepro/releases/tag/v0.0.1
Suggested fix
Adding a
download
attribute in the<a>
-tag for the file. When this is added by manually editing the html in Developer tools, it seems to work as expected.Screenshots
Gitea Version
1.21.3
Can you reproduce the bug on the Gitea demo site?
Yes
Operating System
MacOS and Windows
Browser Version
Chrome Version 120.0.6099.199
The text was updated successfully, but these errors were encountered: