Merge pull request #724 from xieyg7919/master

修复项目图标上传的BUG
This commit is contained in:
玖亖伍
2021-09-28 13:48:48 +08:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -340,7 +340,8 @@ func (c *BookController) UploadCover() {
fileName := "cover_" + strconv.FormatInt(time.Now().UnixNano(), 16)
//附件路径按照项目组织
filePath := filepath.Join("uploads", book.Identify, "images", fileName+ext)
// filePath := filepath.Join("uploads", book.Identify, "images", fileName+ext)
filePath := filepath.Join(conf.WorkingDirectory, "uploads", book.Identify, "images", fileName+ext)
path := filepath.Dir(filePath)