mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-13 08:15:14 +08:00
Merge branch 'dev' of github.com:gogits/gogs into access
Conflicts: gogs.go models/models.go models/user.go templates/.VERSION templates/org/home.tmpl
This commit is contained in:
.gopmfile.travis.ymlCONTRIBUTING.mdREADME.md
cmd
conf/locale
locale_de-DE.inilocale_en-US.inilocale_es-ES.inilocale_fr-CA.inilocale_ja-JP.inilocale_lv-LV.inilocale_nl-NL.inilocale_ru-RU.inilocale_zh-CN.inilocale_zh-HK.ini
docker
gogs.gomodels
modules
auth
base
git
mailer
middleware
setting
public/ng
routers
scripts
templates
@ -245,7 +245,10 @@ func NewConfigContext() {
|
||||
ReverseProxyAuthUser = sec.Key("REVERSE_PROXY_AUTHENTICATION_USER").MustString("X-WEBAUTH-USER")
|
||||
|
||||
sec = Cfg.Section("attachment")
|
||||
AttachmentPath = path.Join(workDir, sec.Key("PATH").MustString("data/attachments"))
|
||||
AttachmentPath = sec.Key("PATH").MustString("data/attachments")
|
||||
if !filepath.IsAbs(AttachmentPath) {
|
||||
AttachmentPath = path.Join(workDir, AttachmentPath)
|
||||
}
|
||||
AttachmentAllowedTypes = sec.Key("ALLOWED_TYPES").MustString("image/jpeg|image/png")
|
||||
AttachmentMaxSize = sec.Key("MAX_SIZE").MustInt64(32)
|
||||
AttachmentMaxFiles = sec.Key("MAX_FILES").MustInt(10)
|
||||
@ -302,7 +305,10 @@ func NewConfigContext() {
|
||||
|
||||
sec = Cfg.Section("picture")
|
||||
PictureService = sec.Key("SERVICE").In("server", []string{"server"})
|
||||
AvatarUploadPath = path.Join(workDir, sec.Key("AVATAR_UPLOAD_PATH").MustString("data/avatars"))
|
||||
AvatarUploadPath = sec.Key("AVATAR_UPLOAD_PATH").MustString("data/avatars")
|
||||
if !filepath.IsAbs(AvatarUploadPath) {
|
||||
AvatarUploadPath = path.Join(workDir, AvatarUploadPath)
|
||||
}
|
||||
os.MkdirAll(AvatarUploadPath, os.ModePerm)
|
||||
switch sec.Key("GRAVATAR_SOURCE").MustString("gravatar") {
|
||||
case "duoshuo":
|
||||
|
Reference in New Issue
Block a user