mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
[Fix] Release attachment should use DownloadURL() not Name (#9529)
* Handle if two or more attachments have the same name * previously only the first could be downloaded - now each is downloadable * dos also take care of #6506 (fix was: #6512) * use func DownloadURL() at issue attatchments too
This commit is contained in:
@@ -82,11 +82,11 @@
|
||||
</li>
|
||||
{{end}}
|
||||
{{if .Attachments}}
|
||||
{{range $attachment := .Attachments}}
|
||||
{{range .Attachments}}
|
||||
<li>
|
||||
<a target="_blank" rel="noopener noreferrer" href="{{$.RepoLink}}/releases/download/{{$release.TagName | PathEscape}}/{{$attachment.Name | PathEscape}}">
|
||||
<strong><span class="ui image octicon octicon-package" title='{{$attachment.Name}}'></span> {{$attachment.Name}}</strong>
|
||||
<span class="ui text grey right">{{$attachment.Size | FileSize}}</span>
|
||||
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
|
||||
<strong><span class="ui image octicon octicon-package" title='{{.Name}}'></span> {{.Name}}</strong>
|
||||
<span class="ui text grey right">{{.Size | FileSize}}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{end}}
|
||||
|
Reference in New Issue
Block a user