1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-12 13:37:20 +00:00

Attach to release (#673)

* Moved attachaments POST url from /issues/attachments to /attachments

* Implemented attachment upload on release page

* Implemented downloading attachments on the release page

* Added zip and gzip files to default allowed attachments

* Implemented uploading attachments on edit release

* Renamed UploadIssueAttachment to UploadAttachment
This commit is contained in:
Philip Couling
2017-01-15 14:57:00 +00:00
committed by Lunny Xiao
parent dce03c19cb
commit 64375d875b
11 changed files with 144 additions and 14 deletions

View File

@ -309,7 +309,7 @@ func runWeb(ctx *cli.Context) error {
return
}
})
m.Post("/issues/attachments", repo.UploadIssueAttachment)
m.Post("/attachments", repo.UploadAttachment)
}, ignSignIn)
m.Group("/:username", func() {
@ -463,13 +463,11 @@ func runWeb(ctx *cli.Context) error {
m.Get("/:id/:action", repo.ChangeMilestonStatus)
m.Post("/delete", repo.DeleteMilestone)
}, reqRepoWriter, context.RepoRef())
m.Group("/releases", func() {
m.Get("/new", repo.NewRelease)
m.Post("/new", bindIgnErr(auth.NewReleaseForm{}), repo.NewReleasePost)
m.Post("/delete", repo.DeleteRelease)
}, reqRepoWriter, context.RepoRef())
m.Group("/releases", func() {
m.Get("/edit/*", repo.EditRelease)
m.Post("/edit/*", bindIgnErr(auth.EditReleaseForm{}), repo.EditReleasePost)