|
@@ -8,7 +8,6 @@ import (
|
|
|
"fmt"
|
|
|
"github.com/kgiannakakis/mp3duration/src/mp3duration"
|
|
|
"github.com/rdlucklib/rdluck_tools/http"
|
|
|
- "io/ioutil"
|
|
|
"os"
|
|
|
"path"
|
|
|
"strconv"
|
|
@@ -42,8 +41,8 @@ func (this *VoiceController) Upload() {
|
|
|
}
|
|
|
reportId, err := this.GetInt("ReportId")
|
|
|
if err != nil {
|
|
|
- br.Msg = "获取资源信息失败"
|
|
|
- br.ErrMsg = "获取资源信息失败,Err:" + err.Error()
|
|
|
+ br.Msg = "报告id异常"
|
|
|
+ br.ErrMsg = "报告id异常,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
reportInfo, err := models.GetReportByReportId(reportId)
|
|
@@ -128,7 +127,7 @@ func (this *VoiceController) Upload() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- fileBody, err := ioutil.ReadFile(fpath)
|
|
|
+ fileBody, err := os.ReadFile(fpath)
|
|
|
videoSize := len(fileBody)
|
|
|
sizeFloat := (float64(videoSize) / float64(1024)) / float64(1024)
|
|
|
sizeStr := utils.SubFloatToFloatStr(sizeFloat, 2)
|