作者 yangfu

修改 1.vod视频权限获取修改

... ... @@ -40,4 +40,7 @@ user_center_app_secret ="cykbjnfqgctn"
h5_host = "http://mmm-web-open-test.fjmaimaimai.com"
#审核中心
suplus_approve_host ="http://suplus-approve-dev.fjmaimaimai.com"
\ No newline at end of file
suplus_approve_host ="http://suplus-approve-dev.fjmaimaimai.com"
#阿里云
cname ="https://media.goexample.live/"
\ No newline at end of file
... ...
... ... @@ -43,3 +43,5 @@ h5_host = "http://mmm-web-open-test.fjmaimaimai.com"
#审核中心
suplus_approve_host ="http://suplus-approve-dev.fjmaimaimai.com"
#阿里云
cname ="https://media.goexample.live/"
\ No newline at end of file
... ...
... ... @@ -159,7 +159,17 @@ func MetricCounter(ctx *context.Context) {
}).Inc()
}
//检查签名
/*检查签名
app 传入 Sign TimeStamp Uuid AccessToken
Sign=》客户端签名串
TimeStamp=》时间戳
UUID字符串=》Uuid(36位)/AccessToken(32位)
//生成签名串与客户端生成的签名串比较
sign="v!(MmM"+TimeStamp + Uuid + AccessToken+"MmM)i^"
signHex = hex.EncodeToString(sha256(sign))
*/
func CheckSign(ctx *context.Context) (result bool) {
var (
h *protocol.RequestHeader
... ...
... ... @@ -10,7 +10,7 @@ type CreateUploadImageResponse struct {
ImageURL string `json:"imageURL"`
UploadAddress string `json:"uploadAddress"`
UploadAuth string `json:"uploadAuth"`
FileURL string `json:"fileURL"`
FileURL string `json:"-"` //fileURL
}
type CreateUploadImagesRequest struct {
... ...
... ... @@ -64,7 +64,7 @@ func CreateUploadVideo(client *vod.Client, r *CreateUploadVideoRequest) (respons
if up, e := ParseUploadAddress(rsp.UploadAddress); e != nil {
log.Error(e)
} else {
response.FileURL = up.GetFileUrl("")
response.FileURL = up.GetFileUrl(beego.AppConfig.String("cname"))
}
return
}
... ... @@ -85,7 +85,7 @@ func RefreshUploadVideo(client *vod.Client, r *RefreshUploadVideoRequest) (respo
if up, e := ParseUploadAddress(rsp.UploadAddress); e != nil {
log.Error(e)
} else {
response.FileURL = up.GetFileUrl("")
response.FileURL = up.GetFileUrl(beego.AppConfig.String("cname"))
}
return
}
... ...