mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-28 12:00:01 +02:00
custom avatar upload
This commit is contained in:
parent
3c3f7c2a56
commit
55dfe2c978
20 changed files with 239 additions and 97 deletions
|
@ -66,9 +66,10 @@ var (
|
|||
ScriptType string
|
||||
|
||||
// Picture settings.
|
||||
PictureService string
|
||||
GravatarSource string
|
||||
DisableGravatar bool
|
||||
PictureService string
|
||||
AvatarUploadPath string
|
||||
GravatarSource string
|
||||
DisableGravatar bool
|
||||
|
||||
// Log settings.
|
||||
LogRootPath string
|
||||
|
@ -259,6 +260,9 @@ func NewConfigContext() {
|
|||
ScriptType = Cfg.MustValue("repository", "SCRIPT_TYPE", "bash")
|
||||
|
||||
PictureService = Cfg.MustValueRange("picture", "SERVICE", "server", []string{"server"})
|
||||
AvatarUploadPath = Cfg.MustValue("picture", "AVATAR_UPLOAD_PATH", "data/avatars")
|
||||
os.MkdirAll(AvatarUploadPath, os.ModePerm)
|
||||
|
||||
switch Cfg.MustValue("picture", "GRAVATAR_SOURCE", "gravatar") {
|
||||
case "duoshuo":
|
||||
GravatarSource = "http://gravatar.duoshuo.com/avatar/"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue