日期:2014-05-17 浏览次数:20457 次
Images img = new Images(); var file = Request.Files["img"]; byte[] b = new byte[file.ContentLength]; Stream s = file.InputStream; s.Read(b, 0, file.ContentLength); s.Close(); img.img = b; img.type = file.ContentType; bool f = manager.SaveImage(img); if (f) { return Json("success"); } else { return Json("fail"); }