|
@@ -230,6 +230,10 @@ func QuestionUploadAudio(c *gin.Context) {
|
|
|
response.FailMsg("读取本地文件失败", "QuestionUploadAudio 读取本地文件失败", c)
|
|
|
return
|
|
|
}
|
|
|
+ if len(fByte) <= 0 {
|
|
|
+ response.FailMsg("文件大小有误", "QuestionUploadAudio 文件大小有误", c)
|
|
|
+ return
|
|
|
+ }
|
|
|
seconds, err := services.GetMP3PlayDuration(fByte)
|
|
|
if err != nil {
|
|
|
response.FailMsg("读取文件时长失败", "QuestionUploadAudio 读取文件时长失败", c)
|