mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-19 10:08:03 +08:00
增加备案信息选项
This commit is contained in:
@@ -503,6 +503,7 @@ func (c *BookController) Create() {
|
||||
}
|
||||
c.JsonResult(6001, "error")
|
||||
}
|
||||
|
||||
//导入
|
||||
func (c *BookController) Import() {
|
||||
|
||||
@@ -515,6 +516,12 @@ func (c *BookController) Import() {
|
||||
|
||||
beego.Info(moreFile.Filename)
|
||||
|
||||
ext := filepath.Ext(moreFile.Filename)
|
||||
|
||||
if !strings.EqualFold(ext,".doc") || !strings.EqualFold(ext,".docx") {
|
||||
c.JsonResult(6004,"不支持的文件类型")
|
||||
}
|
||||
|
||||
tempPath := filepath.Join(os.TempDir(),c.CruSession.SessionID())
|
||||
|
||||
os.MkdirAll(tempPath,0766)
|
||||
@@ -525,7 +532,6 @@ func (c *BookController) Import() {
|
||||
|
||||
converter.Resolve(tempPath)
|
||||
|
||||
|
||||
}
|
||||
|
||||
// CreateToken 创建访问来令牌.
|
||||
|
@@ -435,7 +435,7 @@ func (c *ManagerController) Setting() {
|
||||
c.Data["SITE_TITLE"] = c.Option["SITE_NAME"]
|
||||
|
||||
for _, item := range options {
|
||||
c.Data[item.OptionName] = item
|
||||
c.Data[item.OptionName] = item.OptionValue
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user