Rich Text Editor Image Upload Sample
I want to use imageupload handler for rich text editor but I couldn't complete the code.
<%@ WebHandler Language="C#" Class="imageupload"%>
using System;
using System.Web;
public class Upload : IHttpHandler{
public voidProcessRequest (HttpContext context) {
HttpPostedFile uploads = context.Request.Files["imageupload"];
string file = System.IO.Path.GetFileName(uploads.FileName);
uploads.SaveAs(context.Server.MapPath(".") + "\\Images\\"+ file);
string url = "/Images/"+ file;
..............
}
public bool IsReusable {
get { return false; }
}
}
Images from Rich Text Editor should be stored on the server as files. I couldn't adapt the code sample I found.