This commit is contained in:
苏尹岚
2020-12-14 14:55:55 +08:00
parent 2eb6455122
commit 760269db13

View File

@@ -405,9 +405,8 @@ func (c *EventController) UploadAudio() {
}
os.Chmod(filePath, os.ModePerm)
}
f, err := os.Create(filePath + "/" + fileName)
f, err := os.OpenFile(filePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
if err != nil {
fmt.Println("ccccccccccccccccccccccc", err)
return retVal, "", err
}
defer f.Close()