17,740
社区成员
发帖
与我相关
我的任务
分享
<input id="picture" type="file" accept="image/*" capture="camera" />
var img = $("#picture").get(0).files[0];
var data = new FormData();
data.append("img", img);
$.ajax({
url: "2InteractiveArea_Evaluate.aspx?ajax=1",
data: data,
type: "POST",
processData: false,
contentType: false,
success: function (data) {
});
}
});
if (Request.Files.Count != 0)
{
var img = Request.Files[0];
byte[] bf = new byte[img.ContentLength];
using (var fs = img.InputStream)
{
fs.Read(bf, 0, bf.Length);
}
// bf就是图片啦...
}