作者 yangfu

修改路由

@@ -30,9 +30,9 @@ func (this *VodController) CreateUploadVideo() { @@ -30,9 +30,9 @@ func (this *VodController) CreateUploadVideo() {
30 msg = m 30 msg = m
31 return 31 return
32 } 32 }
33 - //if len(request.FileName) == 0 {  
34 - // request.FileName = aliyun.DefaultVideoFileName  
35 - //} 33 + if len(request.FileName) == 0 {
  34 + request.FileName = aliyun.DefaultVideoFileName
  35 + }
36 header := controllers.GetRequestHeader(this.Ctx) 36 header := controllers.GetRequestHeader(this.Ctx)
37 msg = protocol.NewReturnResponse(vod.CreateUploadVideo(header, request)) 37 msg = protocol.NewReturnResponse(vod.CreateUploadVideo(header, request))
38 } 38 }
1 package protocol 1 package protocol
2 2
3 var errmessge ErrorMap = map[int]string{ 3 var errmessge ErrorMap = map[int]string{
4 - 0: "成功",  
5 - 1: "系统异常",  
6 - 2: "参数错误", 4 + 0: "成功",
  5 + 1: "系统异常",
  6 + 2: "参数错误",
  7 + 113: "签名验证失败",
7 } 8 }
@@ -10,7 +10,8 @@ var nsV1 *beego.Namespace @@ -10,7 +10,8 @@ var nsV1 *beego.Namespace
10 10
11 func init() { 11 func init() {
12 nsV1 := beego.NewNamespace("v1", 12 nsV1 := beego.NewNamespace("v1",
13 - beego.NSNamespace("vod", beego.NSBefore(controllers.FilterComm), beego.NSBefore(controllers.AllowOption), beego.NSInclude(&v1.VodController{})), 13 + beego.NSNamespace("vod", beego.NSBefore(controllers.AllowOption), beego.NSInclude(&v1.VodController{})),
  14 + //beego.NSNamespace("vod", beego.NSBefore(controllers.FilterComm), beego.NSBefore(controllers.AllowOption), beego.NSInclude(&v1.VodController{})),
14 ) 15 )
15 beego.SetStaticPath("/log", beego.AppConfig.String("aliyun_logs_access")) 16 beego.SetStaticPath("/log", beego.AppConfig.String("aliyun_logs_access"))
16 beego.AddNamespace(nsV1) 17 beego.AddNamespace(nsV1)