mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
finish attachments when create issue
This commit is contained in:
@@ -103,6 +103,7 @@ type CreateIssueForm struct {
|
||||
MilestoneID int64
|
||||
AssigneeID int64
|
||||
Content string
|
||||
Attachments []string
|
||||
}
|
||||
|
||||
func (f *CreateIssueForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||
|
File diff suppressed because one or more lines are too long
@@ -285,9 +285,9 @@ func NewConfigContext() {
|
||||
if !filepath.IsAbs(AttachmentPath) {
|
||||
AttachmentPath = path.Join(workDir, AttachmentPath)
|
||||
}
|
||||
AttachmentAllowedTypes = sec.Key("ALLOWED_TYPES").MustString("image/jpeg|image/png")
|
||||
AttachmentAllowedTypes = strings.Replace(sec.Key("ALLOWED_TYPES").MustString("image/jpeg,image/png"), "|", ",", -1)
|
||||
AttachmentMaxSize = sec.Key("MAX_SIZE").MustInt64(32)
|
||||
AttachmentMaxFiles = sec.Key("MAX_FILES").MustInt(10)
|
||||
AttachmentMaxFiles = sec.Key("MAX_FILES").MustInt(5)
|
||||
AttachmentEnabled = sec.Key("ENABLE").MustBool(true)
|
||||
|
||||
TimeFormat = map[string]string{
|
||||
|
Reference in New Issue
Block a user