or
public class ImageBrowserController : EditorImageBrowserController { private const string contentFolderRoot = "~/Content/"; private const string prettyName = "Images/"; private static readonly string[] foldersToCopy = new[] { "~/uploads/newsitem/" }; /// <summary> /// Gets the base paths from which content will be served. /// </summary> public override string ContentPath { get { return CreateUserFolder(); } } private string CreateUserFolder() { var virtualPath = Path.Combine(contentFolderRoot, "UserFiles", prettyName); var path = Server.MapPath(virtualPath); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); foreach (var sourceFolder in foldersToCopy) { CopyFolder(Server.MapPath(sourceFolder), path); } } return virtualPath; } private void CopyFolder(string source, string destination) { if (!Directory.Exists(destination)) { Directory.CreateDirectory(destination); } foreach (var file in Directory.EnumerateFiles(source)) { var dest = Path.Combine(destination, Path.GetFileName(file)); System.IO.File.Copy(file, dest); } foreach (var folder in Directory.EnumerateDirectories(source)) { var dest = Path.Combine(destination, Path.GetFileName(folder)); CopyFolder(folder, dest); } } }$("#Content").kendoEditor({ encoded: false, imageBrowser: { messages: { dropFilesHere: "Drop files here" }, transport: { read: "/console/ImageBrowser/Read", destroy: { url: "/console/ImageBrowser/Destroy", type: "POST" }, create: { url: "/console/ImageBrowser/Create", type: "POST" }, thumbnailUrl: "/console/ImageBrowser/Thumbnail", uploadUrl: "/console/ImageBrowser/Upload", imageUrl: "/console/ImageBrowser/Image?path={0}" } }, tools: [ "bold", "italic", "underline", "strikethrough", "fontSize", "foreColor", "backColor", "justifyLeft", "justifyCenter", "justifyRight", "justifyFull", "createLink", "unlink", "insertImage", "style", "viewHtml" ], style: [ { text: "Highlight Error", value: "hlError" }, { text: "Highlight OK", value: "hlOK" }, { text: "Inline Code", value: "inlineCode" } ], stylesheets: [ "../../content/web/editor/editorStyles.css" ] });#cntr-bnch .k-grid-header { display : none;}