mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-21 03:44:17 +08:00
fix:1、修复附件无法同时上传多个的BUG
2、新增客户端校验附件大小
This commit is contained in:
@@ -12,6 +12,8 @@ import (
|
||||
"github.com/lifei6671/mindoc/conf"
|
||||
"github.com/lifei6671/mindoc/models"
|
||||
"github.com/lifei6671/mindoc/utils"
|
||||
"github.com/lifei6671/mindoc/utils/filetil"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
type BaseController struct {
|
||||
@@ -56,9 +58,6 @@ func (c *BaseController) Prepare() {
|
||||
}
|
||||
}
|
||||
}
|
||||
//c.Member = models.NewMember()
|
||||
//c.Member.Find(1)
|
||||
//c.Data["Member"] = *c.Member
|
||||
}
|
||||
conf.BaseUrl = c.BaseUrl()
|
||||
c.Data["BaseUrl"] = c.BaseUrl()
|
||||
@@ -78,6 +77,10 @@ func (c *BaseController) Prepare() {
|
||||
}
|
||||
}
|
||||
c.Data["HighlightStyle"] = beego.AppConfig.DefaultString("highlight_style","github")
|
||||
|
||||
if filetil.FileExists(filepath.Join(beego.BConfig.WebConfig.ViewsPath,"widgets","scripts.tpl")) {
|
||||
c.LayoutSections["Scripts"] = "widgets/scripts.tpl"
|
||||
}
|
||||
}
|
||||
|
||||
// SetMember 获取或设置当前登录用户信息,如果 MemberId 小于 0 则标识删除 Session
|
||||
|
Reference in New Issue
Block a user