aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2019-12-29 00:33:13 +0100
committerzeripath <art27@cantab.net>2019-12-28 23:33:13 +0000
commit261c3a56a20659a11017ba03e627bf4c789c6899 (patch)
tree074fd8bb258b07f124a16bd02938508fdfd42c5e /routers/repo
parent599c0ee75ffea3ad5f0049ac7d275081370eb149 (diff)
downloadgitea-261c3a56a20659a11017ba03e627bf4c789c6899.tar.gz
gitea-261c3a56a20659a11017ba03e627bf4c789c6899.zip
[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
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index 969f96bfba..d44812729f 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -426,7 +426,7 @@ func RedirectDownload(ctx *context.Context) {
return
}
if att != nil {
- ctx.Redirect(setting.AppSubURL + "/attachments/" + att.UUID)
+ ctx.Redirect(att.DownloadURL())
return
}
}