Update default allowed attachment types (#20193)
Synced the list to what is allowed on GitHub currently.
This commit is contained in:
		
							parent
							
								
									0dab13884a
								
							
						
					
					
						commit
						1ffc700777
					
				| @ -1687,7 +1687,7 @@ PATH = | |||||||
| ;ENABLED = true | ;ENABLED = true | ||||||
| ;; | ;; | ||||||
| ;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. | ;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. | ||||||
| ;ALLOWED_TYPES = .docx,.gif,.gz,.jpeg,.jpg,.mp4,.log,.pdf,.png,.pptx,.txt,.xlsx,.zip | ;ALLOWED_TYPES = .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 | ||||||
| ;; | ;; | ||||||
| ;; Max size of each file. Defaults to 4MB | ;; Max size of each file. Defaults to 4MB | ||||||
| ;MAX_SIZE = 4 | ;MAX_SIZE = 4 | ||||||
|  | |||||||
| @ -741,7 +741,7 @@ Default templates for project boards: | |||||||
| ## Issue and pull request attachments (`attachment`) | ## Issue and pull request attachments (`attachment`) | ||||||
| 
 | 
 | ||||||
| - `ENABLED`: **true**: Whether issue and pull request attachments are enabled. | - `ENABLED`: **true**: Whether issue and pull request attachments are enabled. | ||||||
| - `ALLOWED_TYPES`: **.docx,.gif,.gz,.jpeg,.jpg,mp4,.log,.pdf,.png,.pptx,.txt,.xlsx,.zip**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. | - `ALLOWED_TYPES`: **.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**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. | ||||||
| - `MAX_SIZE`: **4**: Maximum size (MB). | - `MAX_SIZE`: **4**: Maximum size (MB). | ||||||
| - `MAX_FILES`: **5**: Maximum number of attachments that can be uploaded at once. | - `MAX_FILES`: **5**: Maximum number of attachments that can be uploaded at once. | ||||||
| - `STORAGE_TYPE`: **local**: Storage type for attachments, `local` for local disk or `minio` for s3 compatible object storage service, default is `local` or other name defined with `[storage.xxx]` | - `STORAGE_TYPE`: **local**: Storage type for attachments, `local` for local disk or `minio` for s3 compatible object storage service, default is `local` or other name defined with `[storage.xxx]` | ||||||
|  | |||||||
| @ -27,7 +27,7 @@ func newAttachmentService() { | |||||||
| 
 | 
 | ||||||
| 	Attachment.Storage = getStorage("attachments", storageType, sec) | 	Attachment.Storage = getStorage("attachments", storageType, sec) | ||||||
| 
 | 
 | ||||||
| 	Attachment.AllowedTypes = sec.Key("ALLOWED_TYPES").MustString(".docx,.gif,.gz,.jpeg,.jpg,.mp4,.log,.pdf,.png,.pptx,.txt,.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,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip") | ||||||
| 	Attachment.MaxSize = sec.Key("MAX_SIZE").MustInt64(4) | 	Attachment.MaxSize = sec.Key("MAX_SIZE").MustInt64(4) | ||||||
| 	Attachment.MaxFiles = sec.Key("MAX_FILES").MustInt(5) | 	Attachment.MaxFiles = sec.Key("MAX_FILES").MustInt(5) | ||||||
| 	Attachment.Enabled = sec.Key("ENABLED").MustBool(true) | 	Attachment.Enabled = sec.Key("ENABLED").MustBool(true) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user