Skip to content

Commit 703d3ab

Browse files
committed
Update default allowed attachment types
Synced the list to what is allowed on GitHub currently.
1 parent 0dab138 commit 703d3ab

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

custom/conf/app.example.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1687,7 +1687,7 @@ PATH =
16871687
;ENABLED = true
16881688
;;
16891689
;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
1690-
;ALLOWED_TYPES = .docx,.gif,.gz,.jpeg,.jpg,.mp4,.log,.pdf,.png,.pptx,.txt,.xlsx,.zip
1690+
;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
16911691
;;
16921692
;; Max size of each file. Defaults to 4MB
16931693
;MAX_SIZE = 4

docs/content/doc/advanced/config-cheat-sheet.en-us.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ Default templates for project boards:
741741
## Issue and pull request attachments (`attachment`)
742742

743743
- `ENABLED`: **true**: Whether issue and pull request attachments are enabled.
744-
- `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.
744+
- `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.
745745
- `MAX_SIZE`: **4**: Maximum size (MB).
746746
- `MAX_FILES`: **5**: Maximum number of attachments that can be uploaded at once.
747747
- `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]`

modules/setting/attachment.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func newAttachmentService() {
2727

2828
Attachment.Storage = getStorage("attachments", storageType, sec)
2929

30-
Attachment.AllowedTypes = sec.Key("ALLOWED_TYPES").MustString(".docx,.gif,.gz,.jpeg,.jpg,.mp4,.log,.pdf,.png,.pptx,.txt,.xlsx,.zip")
30+
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")
3131
Attachment.MaxSize = sec.Key("MAX_SIZE").MustInt64(4)
3232
Attachment.MaxFiles = sec.Key("MAX_FILES").MustInt(5)
3333
Attachment.Enabled = sec.Key("ENABLED").MustBool(true)

0 commit comments

Comments
 (0)