summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcnphpbb <moqiruyi@gmail.com>2019-11-02 01:53:08 +0800
committertechknowlogick <techknowlogick@gitea.io>2019-11-01 13:53:08 -0400
commit7cf56a16d29622b5103fe2954d7535450b8e2b41 (patch)
treeceaab588082b7852609f61ce5b6c4222c5f3830e
parentebcc38188eab15cfd03b3cf2d1771aa189abfc18 (diff)
downloadgitea-7cf56a16d29622b5103fe2954d7535450b8e2b41.tar.gz
gitea-7cf56a16d29622b5103fe2954d7535450b8e2b41.zip
doc:增加附件`ALLOWED_TYPES`取得MIME type的方法 (#8770)
-rw-r--r--docs/content/doc/advanced/config-cheat-sheet.zh-cn.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/content/doc/advanced/config-cheat-sheet.zh-cn.md b/docs/content/doc/advanced/config-cheat-sheet.zh-cn.md
index a0e33c6370..53426ed983 100644
--- a/docs/content/doc/advanced/config-cheat-sheet.zh-cn.md
+++ b/docs/content/doc/advanced/config-cheat-sheet.zh-cn.md
@@ -173,6 +173,20 @@ menu:
- `MAX_SIZE`: 附件最大限制,单位 MB,比如: `4`。
- `MAX_FILES`: 一次最多上传的附件数量,比如: `5`。
+关于 `ALLOWED_TYPES`, 在 (*)unix 系统中可以使用`file -I <filename>` 来快速获得对应的 `MIME type`。
+
+```shell
+$ file -I test00.tar.xz
+test00.tar.xz: application/x-xz; charset=binary
+
+$ file --mime test00.xlsx
+test00.xlsx: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=binary
+
+file -I test01.xls
+test01.xls: application/vnd.ms-excel; charset=binary
+```
+
+
## Log (`log`)
- `ROOT_PATH`: 日志文件根目录。