I thought i could write my own c# file handler.
so i made a simple handler
...
public class CmsUploadHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
string strFileName = Path.GetFileName(context.Request.Files[0].FileName);
string strSaveLocation = context.Server.MapPath("~/Uploads/") + strFileName;
context.Request.Files[0].SaveAs(strSaveLocation);
context.Response.ContentType = "text/plain";
context.Response.Write("~/Uploads/" + strFileName);
}
public bool IsReusable
{
get {
return false;
}
}
}
The handler works fine, the image is uploaded to the correct directory, but...
im not sure what i should pass back to CKEditor in order to let it know that the image was uploaded.
I get a message saysing Image Source Url Is Missing
I assume this is because i am not sending the correct thing back from my handler.
Anyone know what i should be doing to integrate my handler with CKEditor?
ps im using the most recent version downloaded from the stie.
Mon, 06/28/2010 - 00:08
#1
