From 261c3a56a20659a11017ba03e627bf4c789c6899 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 29 Dec 2019 00:33:13 +0100 Subject: [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 --- routers/repo/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers/repo/repo.go') 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 } } -- cgit v1.2.3