WIP: Allow attachments for issues, not only comments

This commit is contained in:
Justin Nuß
2014-07-23 21:24:24 +02:00
parent 4617bef895
commit 34304e6a0c
5 changed files with 34 additions and 3 deletions

View File

@ -173,7 +173,10 @@ func CreateIssue(ctx *middleware.Context, params martini.Params) {
ctx.Handle(500, "issue.CreateIssue(GetCollaborators)", err)
return
}
ctx.Data["AllowedTypes"] = setting.AttachmentAllowedTypes
ctx.Data["Collaborators"] = us
ctx.HTML(200, ISSUE_CREATE)
}
@ -1030,6 +1033,10 @@ func IssuePostAttachment(ctx *middleware.Context, params martini.Params) {
return
}
if commentId == 0 {
commentId = -1
}
file, header, err := ctx.Req.FormFile("attachment")
if err != nil {