diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-10-14 21:07:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-14 21:07:51 +0800 |
commit | 80a6b0f5bce15a641fc75f5f1ef6e42ef54424bc (patch) | |
tree | 504c7ccdc9cb42e0e282abdd8dbb75c4b24e9f5b /docs/content/doc | |
parent | 93f7525061bc9e6f5be734aba0de31b64c63d7a8 (diff) | |
download | gitea-80a6b0f5bce15a641fc75f5f1ef6e42ef54424bc.tar.gz gitea-80a6b0f5bce15a641fc75f5f1ef6e42ef54424bc.zip |
Avatars and Repo avatars support storing in minio (#12516)
* Avatar support minio
* Support repo avatar minio storage
* Add missing migration
* Fix bug
* Fix test
* Add test for minio store type on avatars and repo avatars; Add documents
* Fix bug
* Fix bug
* Add back missed avatar link method
* refactor codes
* Simplify the codes
* Code improvements
* Fix lint
* Fix test mysql
* Fix test mysql
* Fix test mysql
* Fix settings
* Fix test
* fix test
* Fix bug
Diffstat (limited to 'docs/content/doc')
-rw-r--r-- | docs/content/doc/advanced/config-cheat-sheet.en-us.md | 13 | ||||
-rw-r--r-- | docs/content/doc/advanced/config-cheat-sheet.zh-cn.md | 14 |
2 files changed, 23 insertions, 4 deletions
diff --git a/docs/content/doc/advanced/config-cheat-sheet.en-us.md b/docs/content/doc/advanced/config-cheat-sheet.en-us.md index 3bd667be69..bdd872b0bf 100644 --- a/docs/content/doc/advanced/config-cheat-sheet.en-us.md +++ b/docs/content/doc/advanced/config-cheat-sheet.en-us.md @@ -564,16 +564,21 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type - `DISABLE_GRAVATAR`: **false**: Enable this to use local avatars only. - `ENABLE_FEDERATED_AVATAR`: **false**: Enable support for federated avatars (see [http://www.libravatar.org](http://www.libravatar.org)). + +- `AVATAR_STORAGE_TYPE`: **default**: Storage type defined in `[storage.xxx]`. Default is `default` which will read `[storage]` if no section `[storage]` will be a type `local`. - `AVATAR_UPLOAD_PATH`: **data/avatars**: Path to store user avatar image files. +- `AVATAR_MAX_WIDTH`: **4096**: Maximum avatar image width in pixels. +- `AVATAR_MAX_HEIGHT`: **3072**: Maximum avatar image height in pixels. +- `AVATAR_MAX_FILE_SIZE`: **1048576** (1Mb): Maximum avatar image file size in bytes. + +- `REPOSITORY_AVATAR_STORAGE_TYPE`: **default**: Storage type defined in `[storage.xxx]`. Default is `default` which will read `[storage]` if no section `[storage]` will be a type `local`. - `REPOSITORY_AVATAR_UPLOAD_PATH`: **data/repo-avatars**: Path to store repository avatar image files. - `REPOSITORY_AVATAR_FALLBACK`: **none**: How Gitea deals with missing repository avatars - none = no avatar will be displayed - random = random avatar will be generated - - image = default image will be used (which is set in `REPOSITORY_AVATAR_DEFAULT_IMAGE`) + - image = default image will be used (which is set in `REPOSITORY_AVATAR_FALLBACK_IMAGE`) - `REPOSITORY_AVATAR_FALLBACK_IMAGE`: **/img/repo_default.png**: Image used as default repository avatar (if `REPOSITORY_AVATAR_FALLBACK` is set to image and none was uploaded) -- `AVATAR_MAX_WIDTH`: **4096**: Maximum avatar image width in pixels. -- `AVATAR_MAX_HEIGHT`: **3072**: Maximum avatar image height in pixels. -- `AVATAR_MAX_FILE_SIZE`: **1048576** (1Mb): Maximum avatar image file size in bytes. + ## Project (`project`) 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 efa390bfb0..505fdcdf71 100644 --- a/docs/content/doc/advanced/config-cheat-sheet.zh-cn.md +++ b/docs/content/doc/advanced/config-cheat-sheet.zh-cn.md @@ -182,6 +182,20 @@ menu: - `DISABLE_GRAVATAR`: 开启则只使用内部头像。 - `ENABLE_FEDERATED_AVATAR`: 启用头像联盟支持 (参见 http://www.libravatar.org) +- `AVATAR_STORAGE_TYPE`: **local**: 头像存储类型,可以为 `local` 或 `minio`,分别支持本地文件系统和 minio 兼容的API。 +- `AVATAR_UPLOAD_PATH`: **data/avatars**: 存储头像的文件系统路径。 +- `AVATAR_MAX_WIDTH`: **4096**: 头像最大宽度,单位像素。 +- `AVATAR_MAX_HEIGHT`: **3072**: 头像最大高度,单位像素。 +- `AVATAR_MAX_FILE_SIZE`: **1048576** (1Mb): 头像最大大小。 + +- `REPOSITORY_AVATAR_STORAGE_TYPE`: **local**: 仓库头像存储类型,可以为 `local` 或 `minio`,分别支持本地文件系统和 minio 兼容的API。 +- `REPOSITORY_AVATAR_UPLOAD_PATH`: **data/repo-avatars**: 存储仓库头像的路径。 +- `REPOSITORY_AVATAR_FALLBACK`: **none**: 当头像丢失时的处理方式 + - none = 不显示头像 + - random = 显示随机生成的头像 + - image = 显示默认头像,通过 `REPOSITORY_AVATAR_FALLBACK_IMAGE` 设置 +- `REPOSITORY_AVATAR_FALLBACK_IMAGE`: **/img/repo_default.png**: 默认仓库头像 + ## Attachment (`attachment`) - `ENABLED`: 是否允许用户上传附件。 |