summaryrefslogtreecommitdiffstats
path: root/routers/routes/routes.go
diff options
context:
space:
mode:
authorgdeverlant <e.bekrek@yandex.com>2019-01-06 23:37:30 +0100
committertechknowlogick <hello@techknowlogick.com>2019-01-06 17:37:30 -0500
commitd3dc07f282936849897f861346777b47c8c388d3 (patch)
tree2da810fc1d6671bf8659f9bf868e184698f0fc7c /routers/routes/routes.go
parentdd006db5a719b33aef7887faab48718e4b0f2786 (diff)
downloadgitea-d3dc07f282936849897f861346777b47c8c388d3.tar.gz
gitea-d3dc07f282936849897f861346777b47c8c388d3.zip
Added URL mapping for Release attachments like on github.com (#1707)
Diffstat (limited to 'routers/routes/routes.go')
-rw-r--r--routers/routes/routes.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go
index 5d9a6b31f0..b776d0c201 100644
--- a/routers/routes/routes.go
+++ b/routers/routes/routes.go
@@ -475,6 +475,9 @@ func RegisterRoutes(m *macaron.Macaron) {
}, context.RepoIDAssignment(), context.UnitTypes(), reqRepoCodeReader)
}, reqSignIn)
+ // ***** Release Attachment Download without Signin
+ m.Get("/:username/:reponame/releases/download/:vTag/:fileName", ignSignIn, context.RepoAssignment(), repo.MustBeNotBare, repo.RedirectDownload)
+
m.Group("/:username/:reponame", func() {
m.Group("/settings", func() {
m.Combo("").Get(repo.Settings).