Commit 19e56b26 by Li Feifei

Update upload.go

parent a02682ae
Pipeline #10787 passed with stages
in 23 seconds
......@@ -189,13 +189,23 @@ func Down(v *models.XyuSmallTempFiles) {
fmt.Println(err)
return
}
furl := "https://xiaoyu-live.oss-cn-beijing.aliyuncs.com/" + objectName
furl := "https://xiaoyu-live.oss-cn-beijing-internal.aliyuncs.com/" + objectName
maps, err := getFileInfo(furl)
if err != nil {
fmt.Println(err)
UpdateFileError("2", v.Uuid, v.RoomNum, objectName)
return
}
if _, ok := maps["FileSize"]; !ok {
fmt.Println(err)
UpdateFileError("2", v.Uuid, v.RoomNum, objectName)
return
}
if _, ok := maps["FileSize"].(float64); !ok {
fmt.Println(err)
UpdateFileError("2", v.Uuid, v.RoomNum, objectName)
return
}
room_file["files_size"] = strconv.Itoa(int(maps["FileSize"].(float64)))
link := strings.Replace(v.Url, "xiaoyu-live.oss-cn-beijing-internal.aliyuncs.com", "desktop.offcncloud.com", -1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment