CKEditor file upload doesn't work properly with mvc 6
<p>I'm trying to use the built in upload file of CKEditor,  it works with my MVC5 project, but it doesn't work with my MVC6 project, the code for uploading the file is correct, I've tested it, and it actually upload the file to the server, but it doesn't populate the form with the URL and image information, here's the code for my MVC5 project that works:</p>

<pre><code>public ActionResult UploadImage(HttpPostedFileBase upload, string CKEditorFuncNum, string CKEditor,
       string langCode)
    {
        string vImagePath = String.Empty;
        string vMessage = String.Empty;
        string vFilePath = String.Empty;
        string vOutput = String.Empty;
        try
        {
            if (upload != null &amp;&amp; upload.ContentLength &gt; 0)
            {
                var vFileName = DateTime.Now.ToString("yyyyMMdd-HHMMssff") + " - " + Path.GetFileName(upload.FileName);
                var vFolderPath = Server.MapPath("/Upload/");
                if (!Directory.Exists(vFolderPath))
                {
                    Directory.CreateDirectory(vFolderPath);
                }
                vFilePath = Path.Combine(vFolderPath, vFileName);
                upload.SaveAs(vFilePath);
                vImagePath = Url.Content("/Upload/" + vFileName);
                vMessage = "The file uploaded successfully.";
            }
        }
        catch(Exception e)
        {
            vMessage = "There was an issue uploading:" + e.Message;
        }
        vOutput = @"&lt;html&gt;&lt;body&gt;&lt;script&gt;window.parent.CKEDITOR.tools.callFunction(" + CKEditorFuncNum + ", \"" + vImagePath + "\", \"" + vMessage + "\");&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;";
        return Content(vOutput);
    }
</code></pre>

<p>And here is the code for MVC6 project that doesn't work:</p>

<pre><code>public async Task&lt;ActionResult&gt; UploadImage(IFormFile upload, string CKEditorFuncNum, string CKEditor,
       string langCode)
    {
        string vImagePath = String.Empty;
        string vMessage = String.Empty;
        string vFilePath = String.Empty;
        string vOutput = String.Empty;

        try
        {
            if (upload != null &amp;&amp; upload.Length &gt; 0)
            {
                var vFileName = DateTime.Now.ToString("yyyyMMdd-HHMMssff") + " - " + ContentDispositionHeaderValue.Parse(upload.ContentDisposition).FileName.Trim('"');
                var vFolderPath = Path.Combine(_environment.WebRootPath, "Files", "ArticleUploads");

                if (!Directory.Exists(vFolderPath))
                {
                    Directory.CreateDirectory(vFolderPath);
                }

                vFilePath = Path.Combine(vFolderPath, vFileName);
                 await upload.SaveAsAsync(vFilePath);
                vImagePath = Url.Content("/Files/ArticleUploads/" + vFileName);
                vMessage = "The file uploaded successfully.";
            }
        }
        catch (Exception e)
        {
            vMessage = "There was an issue uploading:" + e.Message;
        }
        vOutput = @"&lt;html&gt;&lt;body&gt;&lt;script&gt;window.parent.CKEDITOR.tools.callFunction(" + CKEditorFuncNum + ", \"" + vImagePath + "\", \"" + vMessage + "\");&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;";
        return Content(vOutput);
    }
</code></pre>

<p>And in CKEditor config file I have:</p>

<pre><code>config.filebrowserImageUploadUrl = '/Admin/Article/UploadImage';
</code></pre>

<p>I've inspected the variables, and they send the same value, also worth to note that I'm using the same version of CKEditor, so that can't be the problem, I'd appreciate any help on this.</p>