When I use the "Quick Upload" tab to upload a file, the URL is not passed to the "Image Info" tab after a successful upload. If I select OK from the "Quick Upload" after a successful upload, CKFinder switches to the "Image Info" tab, and the following error message "Image source URL is missing" appears. Can anyone shed light on why this might be occurring?
CKFinder - Quick Upload not passing URL to image Info tab after successful upload
4k views Asked by RHPT At
2
There are 2 answers
0
On
It work for me with CKEditor 4. You can try like this:
public ActionResult uploadnow(HttpPostedFileWrapper upload, string CKEditorFuncNum)
{
string path = "";
string pathWeb ="";
if (upload != null)
{
string ImageName = upload.FileName;
string extention = Path.GetExtension(ImageName);
string name = DateTime.Now.ToString("yyMMddhhmmssms");
ImageName = name + extention;
pathWeb = "/images/uploads/" + ImageName;
path = System.IO.Path.Combine(Server.MapPath("~/images/uploads"), ImageName);
upload.SaveAs(path);
HttpContext.Response.Write("<script>window.parent.CKEDITOR.tools.callFunction(" + CKEditorFuncNum + ", \"" + pathWeb + "\");</script>");
HttpContext.Response.End();
}
return View();
}
Use this code.
In CKEditor config -
Your Action Method