protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Response.AddHeader("Content-Type", "text/plain"); Response.Write(WebUploaderHandler.Process(System.Web.HttpContext.Current, UploadType.Image)); } }
public JsonResult Upload(UploadType type = UploadType.Image) { return(Json(WebUploaderHandler.Process(System.Web.HttpContext.Current, type))); }