标签:style blog http color java 使用 os strong
借助 .NET 4.0 新增的 Stream.CopyTo (),可以轻松实现“流对流”保存上传文件,示例代码如下:
public ActionResult ProcessUpload(string filename) { using (var inputStream = Request.InputStream) { using (var flieStream = new FileStream(@"c:\temp\" + filename, FileMode.Create)) { inputStream.CopyTo(flieStream); } } return Json(new { success = true }); }
用Fine Uploader+ASP.NET MVC实现ajax文件上传[代码示例],布布扣,bubuko.com
用Fine Uploader+ASP.NET MVC实现ajax文件上传[代码示例]
标签:style blog http color java 使用 os strong
原文地址:http://www.cnblogs.com/itjeff/p/3890364.html