mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	WIP: Allow attachments for comments
This commit is contained in:
		| @@ -71,6 +71,10 @@ var ( | ||||
| 	LogModes    []string | ||||
| 	LogConfigs  []string | ||||
|  | ||||
| 	// Attachment settings. | ||||
| 	AttachmentPath         string | ||||
| 	AttachmentAllowedTypes string | ||||
|  | ||||
| 	// Cache settings. | ||||
| 	Cache        cache.Cache | ||||
| 	CacheAdapter string | ||||
| @@ -166,6 +170,13 @@ func NewConfigContext() { | ||||
| 	CookieRememberName = Cfg.MustValue("security", "COOKIE_REMEMBER_NAME") | ||||
| 	ReverseProxyAuthUser = Cfg.MustValue("security", "REVERSE_PROXY_AUTHENTICATION_USER", "X-WEBAUTH-USER") | ||||
|  | ||||
| 	AttachmentPath = Cfg.MustValue("attachment", "PATH", "files/attachments") | ||||
| 	AttachmentAllowedTypes = Cfg.MustValue("attachment", "ALLOWED_TYPES", "*/*") | ||||
|  | ||||
| 	if err = os.MkdirAll(AttachmentPath, os.ModePerm); err != nil { | ||||
| 		log.Fatal("Could not create directory %s: %s", AttachmentPath, err) | ||||
| 	} | ||||
|  | ||||
| 	RunUser = Cfg.MustValue("", "RUN_USER") | ||||
| 	curUser := os.Getenv("USER") | ||||
| 	if len(curUser) == 0 { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user