mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 00:45:22 +02:00
WIP: Allow attachments for issues, not only comments
This commit is contained in:
parent
4617bef895
commit
34304e6a0c
5 changed files with 34 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue