mirror of
https://github.com/mindoc-org/mindoc.git
synced 2026-02-27 17:03:57 +08:00
fix:修复分享地址和Token生成地址错误的问题
This commit is contained in:
@@ -533,14 +533,14 @@ func (c *BlogController) Upload() {
|
||||
|
||||
if err := attachment.Insert(); err != nil {
|
||||
os.Remove(filePath)
|
||||
beego.Error("保存文件附件失败 => ", err)
|
||||
beego.Error("保存文件附件失败 -> ", err)
|
||||
c.JsonResult(6006, "文件保存失败")
|
||||
}
|
||||
if attachment.HttpPath == "" {
|
||||
attachment.HttpPath = conf.URLFor("BlogController.Download", ":id", blogId, ":attach_id", attachment.AttachmentId)
|
||||
attachment.HttpPath = conf.URLForNotHost("BlogController.Download", ":id", blogId, ":attach_id", attachment.AttachmentId)
|
||||
|
||||
if err := attachment.Update(); err != nil {
|
||||
beego.Error("SaveToFile => ", err)
|
||||
beego.Error("保存文件失败 -> ",attachment.FilePath, err)
|
||||
c.JsonResult(6005, "保存文件失败")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -470,7 +470,7 @@ func (c *DocumentController) Upload() {
|
||||
}
|
||||
|
||||
if attachment.HttpPath == "" {
|
||||
attachment.HttpPath = conf.URLFor("DocumentController.DownloadAttachment", ":key", identify, ":attach_id", attachment.AttachmentId)
|
||||
attachment.HttpPath = conf.URLForNotHost("DocumentController.DownloadAttachment", ":key", identify, ":attach_id", attachment.AttachmentId)
|
||||
|
||||
if err := attachment.Update(); err != nil {
|
||||
beego.Error("保存文件失败 ->", err)
|
||||
|
||||
@@ -413,7 +413,7 @@ func (c *ManagerController) DeleteBook() {
|
||||
c.JsonResult(6002, "项目不存在")
|
||||
}
|
||||
if err != nil {
|
||||
logs.Error("DeleteBook => ", err)
|
||||
logs.Error("删除失败 -> ", err)
|
||||
c.JsonResult(6003, "删除失败")
|
||||
}
|
||||
c.JsonResult(0, "ok")
|
||||
|
||||
Reference in New Issue
Block a user