{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "file-manager-file-upload",
  "framework": "aspnet-mvc",
  "type": "registry:component",
  "component": "FileManager",
  "variant": "file-upload",
  "dependencies": [
    "Syncfusion.AspNetMvc.FileManager",
    "Syncfusion.AspNetMvc.Buttons",
    "Syncfusion.AspNetMvc.Inputs",
    "Syncfusion.AspNetMvc.Popups"
  ],
  "description": "File manager demonstrating file upload operations with an upload-enabled toolbar.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/aspnet-mvc/llms.txt",
    "skillPack": "syncfusion/aspnetmvc-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/aspnet-mvc/file-manager-file-upload.md"
  },
  "files": [
    {
      "target": "src/components/file-manager-file-upload/FileManager.cshtml",
      "content": "@using Syncfusion.EJ2.FileManager\n@using Syncfusion.EJ2.Inputs\n@using Syncfusion.EJ2.Buttons\n@using Syncfusion.EJ2.Popups\n@using EJ2MVCSampleBrowser.Models\n@{\n    string[] items = new string[] { \"NewFolder\", \"Upload\", \"Cut\", \"Copy\", \"Delete\", \"Rename\", \"SortBy\", \"Refresh\", \"Selection\", \"View\", \"Details\" };\n    string[] file = new string[] { \"Cut\", \"Copy\", \"|\", \"Delete\", \"Download\", \"Rename\", \"|\", \"Details\" };\n}\n@section ControlsSection{\n    <div class=\"control-section\">\n        <div class=\"sample-container\">\n            <!-- File Manager real time use case sample -->\n            <div id='container' class=\"fileupload\">\n                @Html.EJS().Uploader(\"UploadFile\").Render()\n                @Html.EJS().Button(\"openBtn\").Content(\"File Browser\").Render()\n            </div>\n            <div id='target' class=\"control-section\">\n                @*Dialog*@\n                @Html.EJS().Dialog(\"dialog\").AnimationSettings(new DialogAnimationSettings() { Effect = DialogEffect.None }).Created(\"onDialogLoad\").Close(\"dialogClose\").Open(\"dialogOpen\").Header(\"Select a file\").Visible(false).ShowCloseIcon(true).Width(\"850px\").Target(\"#target\").ContentTemplate(@<div class='dialogContent'>\n                    @Html.EJS().FileManager(\"filemanager\").AjaxSettings(new Syncfusion.EJ2.FileManager.FileManagerAjaxSettings  {\n                        Url = Url.Content(\"~/FileManager/FileOperations\"),\n                        DownloadUrl = Url.Content(\"~/FileManager/Download\"),\n                        UploadUrl = Url.Content(\"~/FileManager/Upload\"),\n                        GetImageUrl = Url.Content(\"~/FileManager/GetImage\")\n               }).ToolbarSettings(new Syncfusion.EJ2.FileManager.FileManagerToolbarSettings() { Items = items }).ContextMenuSettings(new Syncfusion.EJ2.FileManager.FileManagerContextMenuSettings() {\n                   File = file\n               }).FileOpen(\"onFileOpen\").Render()</div>).Render()\n            </div>\n        </div>\n    </div>\n    \n}\n\n@*@section PreScripts {*@\n    <script>\n        function onDialogLoad() {\n            document.getElementById(\"openBtn\").addEventListener('click', function () {\n                var dialogObj = document.getElementById('dialog').ej2_instances[0];\n                dialogObj.show();\n                var filemanagerObj = document.getElementById('filemanager').ej2_instances[0];\n                filemanagerObj.path = \"/\";\n                filemanagerObj.selectedItems = [];\n                filemanagerObj.refresh();\n            });\n        }\n        // Uploader will be hidden, if Dialog is opened\n        function dialogOpen() {\n            document.getElementById('container').style.display = 'none';\n        }\n        // Uploader will be shown, if Dialog is closed\n        function dialogClose() {           \n            document.getElementById('container').style.display = 'block';\n        }\n        // File Manager's fileOpen event function\n        function onFileOpen(args) {\n            var file = args.fileDetails;\n            if (file.isFile) {\n                args.cancel = true;\n                if (file.size <= 0 ) { file.size = 10000; }\n                var uploadObject = document.getElementById('UploadFile').ej2_instances[0];\n                var dialogObj = document.getElementById('dialog').ej2_instances[0];\n                uploadObject.files = [{name: file.name, size: file.size, type: file.type }];\n                dialogObj.hide();\n            }\n        }\n    </script>\n@*}*@\n\n\n<style>\n    .fileupload {\n        max-width: 500px;\n        margin: auto;\n    }\n\n    #openBtn {\n        position: absolute;\n        top: 28px;\n        left: 43%;\n    }\n\n    .tailwind #openBtn,\n    .tailwind-dark #openBtn {\n        top: 28px;\n    }\n\n    .bootstrap #openBtn,\n    .bootstrap-dark #openBtn {\n        top: 30px;\n    }\n\n    .bootstrap5 #openBtn,\n    .bootstrap5-dark #openBtn {\n        top: 26px;\n    }\n\n    #target {\n        height: 550px;\n    }\n    #dialog {\n        top: 20px !important;\n        max-height: 500px !important;\n    }\n    .fileupload .e-file-drop, .fileupload .e-css.e-btn {\n        display: none;\n    }\n\n    .fluent2 .fileupload .e-file-select-wrap {\n        padding: 20px 0 20px 20px;\n    }\n</style>"
    },
    {
      "target": "src/components/file-manager-file-upload/FileManagerController.cs",
      "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Mvc;\nusing Syncfusion.EJ2.Popups;\n\nnamespace EJ2MVCSampleBrowser.Controllers\n{\n    public partial class FileManagerController : Controller\n    {\n        // GET: FileUpload\n        public ActionResult FileUpload()\n        {\n            return View(\"~/Views/Home/file-manager/file-upload/FileManager.cshtml\");\n        }\n    }\n}"
    }
  ]
}