aboutsummaryrefslogtreecommitdiff
path: root/routers/repo/issue.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r--routers/repo/issue.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index a5908c18..e2d8000e 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -447,7 +447,6 @@ func UploadIssueAttachment(ctx *context.Context) {
return
}
- allowedTypes := strings.Split(setting.AttachmentAllowedTypes, ",")
file, header, err := ctx.Req.FormFile("file")
if err != nil {
ctx.Error(500, fmt.Sprintf("FormFile: %v", err))
@@ -462,6 +461,7 @@ func UploadIssueAttachment(ctx *context.Context) {
}
fileType := http.DetectContentType(buf)
+ allowedTypes := strings.Split(setting.AttachmentAllowedTypes, ",")
allowed := false
for _, t := range allowedTypes {
t := strings.Trim(t, " ")