fix: 文件路径ToSlash去除多斜杠转义
This commit is contained in:
@@ -220,7 +220,7 @@ func (s *CommontController) TransferStaticFile(c *gin.Context) {
|
||||
|
||||
delPrefix := strings.Replace(body.StaticPath, static["prefix"].(string), "", 1)
|
||||
staticPath := strings.Replace(delPrefix, "{language}", lang, 1)
|
||||
newFile := fmt.Sprintf("%s%s", dir, staticPath)
|
||||
newFile := filepath.ToSlash(fmt.Sprintf("%s%s", dir, staticPath))
|
||||
|
||||
err = file.CopyUploadFile(body.UploadPath, newFile)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user