I am having the Ck Editor version 4.4.6.
In that I add an extra plugin for uploading images.
That system's ck editor image upload plugin is working correctly in my system and other systems in my office, in all browsers (IE,Firefox,and Chrome), but it is not working in the client's system in any browser.
I have checked all the browser settings of the client but it was all the same as in our browser settings.
This is the script for add fileupload url browser
<script type="text/javascript">
$(function() {
CKEDITOR.replace('<%=ckeditjncms.ClientID %>',
{ filebrowserImageUploadUrl: 'http://joinbw.in/Upload.ashx' }); //path to “Upload.ashx”
});
</script>
And the upload.ashx
is:
<%@ WebHandler Language="C#" Class="Upload" %>
using System;
using System.Web;
public class Upload : IHttpHandler {
public void ProcessRequest (HttpContext context) {
HttpPostedFile uploads = context.Request.Files["upload"];
string CKEditorFuncNum = context.Request["CKEditorFuncNum"];
string file = System.IO.Path.GetFileName(uploads.FileName);
Guid g;
g = Guid.NewGuid();
file = g + file;
uploads.SaveAs(context.Server.MapPath("CKEditorImages/" + file));
// uploads.SaveAs(context.Server.MapPath(".") + "\\CKEditorImages\\" + file);
string url = "http://joinbw.in/CKEditorImages/" + file;
context.Response.Write("<script>window.parent.CKEDITOR.tools.callFunction(" + CKEditorFuncNum + ", \"" + url + "\");</script>");
//context.Response.Clear();
context.Response.End();
}
public bool IsReusable {
get {
return false;
}
}
}
Sounds like an IIS configuration issue or a file permission issue. Ensure that your webserver has write permissions.