Reference: http://www.cnblogs.com/dudu/archive/2012/11/27/fine_uploader_mvc_ajax.html asp.net mvc example
Example of http://fineuploader.com/fine-uploader-demo.html Official Website
Note: The size limit of uploaded files in webconfig
I:
<Configuration> <system. web> <compilation debug = "true" targetFramework = "4.0"/> II:
The specified file path must exist.
Some HTML code:
<!DOCTYPE html>
Code in ashx:
Using System; using System. collections. generic; using System. linq; using System. web; using System. IO; using System. web. script. serialization; namespace WebApplication2 {/// <summary> /// summary of Handler1 /// </summary> public class Msg {public bool success {get; set ;}} public class Handler1: IHttpHandler {public void ProcessRequest (HttpContext context) {context. response. contentType = "text/plain"; string fileName = context. request ["qqfile"]; using (var inputStream = context. request. inputStream) {using (var flieStream = new FileStream (@ "c: \ temp \" + fileName, FileMode. create) {inputStream. copyTo (flieStream);} context. response. write (new JavaScriptSerializer (). serialize (new Msg () {success = true});} public bool IsReusable {get {return false ;}}}}