Skip to content

Commit 7cf56a1

Browse files
cnphpbbtechknowlogick
authored andcommitted
doc:增加附件ALLOWED_TYPES取得MIME type的方法 (#8770)
1 parent ebcc381 commit 7cf56a1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/content/doc/advanced/config-cheat-sheet.zh-cn.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,20 @@ menu:
173173
- `MAX_SIZE`: 附件最大限制,单位 MB,比如: `4`
174174
- `MAX_FILES`: 一次最多上传的附件数量,比如: `5`
175175

176+
关于 `ALLOWED_TYPES`, 在 (*)unix 系统中可以使用`file -I <filename>` 来快速获得对应的 `MIME type`
177+
178+
```shell
179+
$ file -I test00.tar.xz
180+
test00.tar.xz: application/x-xz; charset=binary
181+
182+
$ file --mime test00.xlsx
183+
test00.xlsx: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=binary
184+
185+
file -I test01.xls
186+
test01.xls: application/vnd.ms-excel; charset=binary
187+
```
188+
189+
176190
## Log (`log`)
177191

178192
- `ROOT_PATH`: 日志文件根目录。

0 commit comments

Comments
 (0)