コード例 #1
0
        public ActionResult CreateUploadImage(CreateUploadImageRequest request)
        {
            var res = aliServer.CreateUploadImage(request);
            GetImageInfoResponse        imgInfo = aliServer.GetImageInfo(res.ImageId);
            Dictionary <string, object> dic     = new Dictionary <string, object>();

            dic.Add("auth", res);
            dic.Add("imginfo", imgInfo);
            return(Json(dic, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        /// <summary>
        /// 获取图片上传地址和凭证
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public CreateUploadImageResponse CreateUploadImage(CreateUploadImageRequest request)
        {
            CreateUploadImageResponse response = new CreateUploadImageResponse();

            try
            {
                response = acsClient.GetAcsResponse(request);
            }
            catch (Exception ex)
            {
                throw;
            }
            return(response);
        }
コード例 #3
0
 public ActionResult AddImg(CreateUploadImageRequest request)
 {
     return(View());
 }