public IActionResult FileBrowserUpload(String id, String CKEditorFuncNum, String Source, [FromForm] IFormFile Upload) { // The file to be attached CKEditorUploadResponse result = new CKEditorUploadResponse() { }; // Get the blog that is for this controller instance if (Current != null) { // Get the blog item IBlogItem blogItem = Current.Get(new BlogHeader() { Id = Current.Parameters.Provider.DecodeId(id) }); if (blogItem != null) { // Which editor was requested? switch (Source) { // Was CK Editor being used? If so set certain properties of the view model case "CKEditor": // If the file upload is goodthen BlogFile file = UploadFile(Current, blogItem, Upload.FileName, Upload); result.Uploaded = 1; result.Filename = Upload.FileName; result.Url = HtmlHelpers.AttachmentUrl(blogItem, file, ControllerName); break; } } } // Return the object as the result return(Json(result)); }