mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-21 13:38:00 +02:00
WIP: Allow attachments for issues, not only comments
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user