Ejemplo n.º 1
0
        public ActionResult CreateImg()
        {
            string base64ImgString = Request.Params["a"];
            string customerNumber  = System.Web.HttpUtility.HtmlDecode(Request.Form["b"]);

            string[] u        = base64ImgString.Split(',');
            string   imgstr   = u[1];
            string   filename = "/tizhiresult/" + customerNumber + ".png";

            // string filename = "/tizhiresult/" + CommonTools.ToUnixTime(System.DateTime.Now).ToString() + CommonTools.getRandomNumber() +".png";
            FileTools.Base64StringToImage(imgstr, filename);
            //   CMSService.UpdateFieldOneByOne("Tizhi", "CMSTizhi", "TizhiNumber='" + customerNumber + "'", "TizhiImg", filename);

            return(Content("成功了"));
        }