mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Backport #23580 by @silverwind Updated this default to GitHub's latest, adding the `.patch` file extension to allowed types. Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
		@@ -26,7 +26,7 @@ func loadAttachmentFrom(rootCfg ConfigProvider) {
 | 
			
		||||
 | 
			
		||||
	Attachment.Storage = getStorage(rootCfg, "attachments", storageType, sec)
 | 
			
		||||
 | 
			
		||||
	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,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip")
 | 
			
		||||
	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.MaxSize = sec.Key("MAX_SIZE").MustInt64(4)
 | 
			
		||||
	Attachment.MaxFiles = sec.Key("MAX_FILES").MustInt(5)
 | 
			
		||||
	Attachment.Enabled = sec.Key("ENABLED").MustBool(true)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user