ss
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxstore/event"
|
"git.rosy.net.cn/jx-callback/business/jxstore/event"
|
||||||
@@ -399,11 +400,12 @@ func (c *EventController) UploadAudio() {
|
|||||||
fileName := utils.GetUUID() + "_" + timeStr + path.Ext(head.Filename)
|
fileName := utils.GetUUID() + "_" + timeStr + path.Ext(head.Filename)
|
||||||
fmt.Println("aaaaaaaaaaaaaaaaaaaaaaa", fileName)
|
fmt.Println("aaaaaaaaaaaaaaaaaaaaaaa", fileName)
|
||||||
if _, err = os.Stat(filePath); os.IsNotExist(err) {
|
if _, err = os.Stat(filePath); os.IsNotExist(err) {
|
||||||
err = os.MkdirAll(filePath, os.ModePerm)
|
syscall.Mkdir(filePath, 0777)
|
||||||
if err != nil {
|
// err = os.MkdirAll(filePath, os.ModePerm)
|
||||||
return retVal, "", err
|
// if err != nil {
|
||||||
}
|
// return retVal, "", err
|
||||||
os.Chmod(filePath, os.ModePerm)
|
// }
|
||||||
|
// os.Chmod(filePath, os.ModePerm)
|
||||||
}
|
}
|
||||||
f, err := os.OpenFile(filePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
|
f, err := os.OpenFile(filePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user