fix:1、修复附件无法同时上传多个的BUG

2、新增客户端校验附件大小
This commit is contained in:
lifei6671
2018-09-11 15:57:03 +08:00
parent 929f54840b
commit 90efeac326
8 changed files with 59 additions and 57 deletions

View File

@@ -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