修复只有第一次导入docx文件有效问题

This commit is contained in:
Rebellioncry
2022-11-30 14:15:12 +08:00
parent d43010640b
commit ade6734779
2 changed files with 23 additions and 22 deletions

View File

@@ -126,7 +126,7 @@ func (c *BookController) Setting() {
}
//保存项目信息
// 保存项目信息
func (c *BookController) SaveBook() {
bookResult, err := c.IsPermission()
@@ -216,7 +216,7 @@ func (c *BookController) SaveBook() {
c.JsonResult(0, "ok", bookResult)
}
//设置项目私有状态.
// 设置项目私有状态.
func (c *BookController) PrivatelyOwned() {
status := c.GetString("status")
@@ -296,7 +296,7 @@ func (c *BookController) Transfer() {
c.JsonResult(0, "ok")
}
//上传项目封面.
// 上传项目封面.
func (c *BookController) UploadCover() {
bookResult, err := c.IsPermission()
@@ -544,7 +544,7 @@ func (c *BookController) Create() {
c.JsonResult(6001, "error")
}
//复制项目
// 复制项目
func (c *BookController) Copy() {
if c.Ctx.Input.IsPost() {
//检查是否有复制项目的权限
@@ -622,6 +622,9 @@ func (c *BookController) Import() {
tempPath = filepath.Join(tempPath, moreFile.Filename)
err = c.SaveToFile("import-file", tempPath)
if err != nil {
c.JsonResult(6004, i18n.Tr(c.Lang, "message.upload_failed"))
}
book := models.NewBook()
@@ -724,7 +727,7 @@ func (c *BookController) Delete() {
c.JsonResult(0, "ok")
}
//发布项目.
// 发布项目.
func (c *BookController) Release() {
c.Prepare()
@@ -763,7 +766,7 @@ func (c *BookController) Release() {
c.JsonResult(0, i18n.Tr(c.Lang, "message.publish_to_queue"))
}
//文档排序.
// 文档排序.
func (c *BookController) SaveSort() {
c.Prepare()
@@ -924,7 +927,7 @@ func (c *BookController) TeamAdd() {
c.JsonResult(0, "OK", teamRel)
}
//删除项目的团队.
// 删除项目的团队.
func (c *BookController) TeamDelete() {
c.Prepare()
@@ -955,7 +958,7 @@ func (c *BookController) TeamDelete() {
c.JsonResult(0, "OK")
}
//团队搜索.
// 团队搜索.
func (c *BookController) TeamSearch() {
c.Prepare()
@@ -976,7 +979,7 @@ func (c *BookController) TeamSearch() {
}
//项目空间搜索.
// 项目空间搜索.
func (c *BookController) ItemsetsSearch() {
c.Prepare()