【发布时间】:2017-05-22 01:30:07
【问题描述】:
web api 操作:
byte[] bytes = System.IO.File
.ReadAllBytes(
HttpContext.Current.Server.MapPath("~/Images/orderedList1.png"));
var result_ = new HttpResponseMessage(HttpStatusCode.OK);
result_.Content = new ByteArrayContent(bytes);
result_.Content.Headers.ContentType = new MediaTypeHeaderValue("image/png");
return result_;
【问题讨论】:
标签: c# asp.net-mvc asp.net-web-api asp.net-web-api2