summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJustin Nuß <justin.nuss@hmmh.de>2014-07-24 15:19:59 +0200
committerJustin Nuß <justin.nuss@hmmh.de>2014-07-24 15:19:59 +0200
commitbfe5b86004791823b198be76084aa128d262b290 (patch)
tree95e7e6f9633793f20d43309412fe9c2e66b1527f /cmd
parent43e5de7f830a098582b519706f9c5da6eecd2c3e (diff)
downloadgitea-bfe5b86004791823b198be76084aa128d262b290.tar.gz
gitea-bfe5b86004791823b198be76084aa128d262b290.zip
Add file upload for attachments
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/cmd/web.go b/cmd/web.go
index aea0cd86aa..bb020fab90 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -238,6 +238,7 @@ func runWeb(*cli.Context) {
r.Post("/:index/label", repo.UpdateIssueLabel)
r.Post("/:index/milestone", repo.UpdateIssueMilestone)
r.Post("/:index/assignee", repo.UpdateAssignee)
+ r.Get("/:index/attachment/:id", repo.IssueGetAttachment)
r.Post("/labels/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel)
r.Post("/labels/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel)
r.Post("/labels/delete", repo.DeleteLabel)
@@ -254,13 +255,6 @@ func runWeb(*cli.Context) {
r.Get("/releases/edit/:tagname", repo.EditRelease)
}, reqSignIn, middleware.RepoAssignment(true))
- m.Group("/:username/:reponame/issues/:index/attachment", func(r martini.Router) {
- r.Get("/:id", repo.IssueGetAttachment)
- r.Post("/", repo.IssuePostAttachment)
- r.Post("/:comment", repo.IssuePostAttachment)
- r.Delete("/:comment/:id", repo.IssueDeleteAttachment)
- }, reqSignIn, middleware.RepoAssignment(true), middleware.Toggle(&middleware.ToggleOptions{DisableCsrf: true}))
-
m.Group("/:username/:reponame", func(r martini.Router) {
r.Post("/releases/new", bindIgnErr(auth.NewReleaseForm{}), repo.NewReleasePost)
r.Post("/releases/edit/:tagname", bindIgnErr(auth.EditReleaseForm{}), repo.EditReleasePost)