upload audio
This commit is contained in:
@@ -399,7 +399,10 @@ func (c *EventController) UploadAudio() {
|
||||
fileName := utils.GetUUID() + "_" + timeStr + path.Ext(head.Filename)
|
||||
fmt.Println("aaaaaaaaaaaaaaaaaaaaaaa", fileName)
|
||||
if _, err = os.Stat(filePath); os.IsNotExist(err) {
|
||||
os.MkdirAll(filePath, os.ModePerm)
|
||||
err = os.MkdirAll(filePath, os.ModePerm)
|
||||
if err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
os.Chmod(filePath, os.ModePerm)
|
||||
}
|
||||
f, err := os.Create(filePath + "/" + fileName)
|
||||
|
||||
Reference in New Issue
Block a user