You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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:
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: