mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 19:06:18 +01:00 
			
		
		
		
	Update allowed attachment types (#29688)
Update to match GitHub's latest. Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
		| @@ -12,7 +12,7 @@ var Attachment = struct { | ||||
| 	Enabled      bool | ||||
| }{ | ||||
| 	Storage:      &Storage{}, | ||||
| 	AllowedTypes: ".csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip", | ||||
| 	AllowedTypes: ".cpuprofile,.csv,.dmp,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.json,.jsonc,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip", | ||||
| 	MaxSize:      2048, | ||||
| 	MaxFiles:     5, | ||||
| 	Enabled:      true, | ||||
| @@ -25,7 +25,7 @@ func loadAttachmentFrom(rootCfg ConfigProvider) (err error) { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	Attachment.AllowedTypes = sec.Key("ALLOWED_TYPES").MustString(".csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip") | ||||
| 	Attachment.AllowedTypes = sec.Key("ALLOWED_TYPES").MustString(".cpuprofile,.csv,.dmp,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.json,.jsonc,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip") | ||||
| 	Attachment.MaxSize = sec.Key("MAX_SIZE").MustInt64(2048) | ||||
| 	Attachment.MaxFiles = sec.Key("MAX_FILES").MustInt(5) | ||||
| 	Attachment.Enabled = sec.Key("ENABLED").MustBool(true) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user