{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "file-manager-file-upload",
  "framework": "javascript",
  "type": "registry:component",
  "component": "FileManager",
  "variant": "file-upload",
  "dependencies": [
    "@syncfusion/ej2-filemanager"
  ],
  "description": "File manager sample with upload progress, validation, and content management.",
  "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": true,
    "platformIndex": "https://ai.syncfusion.com/javascript/llms.txt",
    "skillPack": "syncfusion/javascript-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/javascript/file-manager-file-upload.md"
  },
  "files": [
    {
      "target": "src/components/file-manager-file-upload/file-manager.html",
      "content": "<div class=\"control-section\">\n    <div id='uploadContainer' class=\"fileupload\">\n        <input type=\"file\" id=\"fileupload\" name=\"UploadFiles\" onclick=\"return onclick()\"/>\n        <button id=\"openBtn\" class=\"dlgbtn\" type=\"button\">File Browser</button>\n    </div>\n    <div id='target' class=\"control-section\">\n        <div id='dialog'>\n            <div id=\"fileManager\"></div>\n        </div>\n    </div>\n</div>\n\n\n<style>\n    .fileupload {\n        box-sizing: border-box;\n        display: flex;\n        align-items: center;\n        justify-content: space-between;\n        gap: 16px;\n        width: 100%;\n        max-width: 500px;\n        min-height: 96px;\n        margin: 0 auto;\n        padding: 16px 20px;\n        border: 1px solid #c8c8c8;\n        border-radius: 4px;\n        background-color: #fff;\n        position: relative;\n    }\n\n    .fileupload .e-upload {\n        flex: 1 1 auto;\n        min-width: 0;\n        border: 0;\n    }\n\n    #openBtn {\n        position: absolute;\n        top: 50%;\n        left: 50%;\n        transform: translate(-50%, -50%);\n    }\n\n    #target {\n        position: relative;\n        min-height: 550px;\n    }\n\n    #dialog {\n        top: 20px !important;\n        max-height: 500px !important;\n    }\n\n    .fileupload .e-file-drop,\n    .fileupload .e-file-select-wrap .e-css.e-btn {\n        display: none;\n    }\n\n    .fileupload .e-file-select-wrap {\n        padding: 0;\n    }\n\n    @media (max-width: 480px) {\n        .fileupload {\n            gap: 12px;\n            padding: 12px;\n        }\n    }\n</style>\n"
    },
    {
      "target": "src/components/file-manager-file-upload/file-manager.ts",
      "content": "import { Uploader } from '@syncfusion/ej2-inputs';\nimport { Dialog } from '@syncfusion/ej2-popups';\nimport { FileManager, type FileOpenEventArgs, Toolbar, NavigationPane, DetailsView } from '@syncfusion/ej2-filemanager';\nimport { Button } from '@syncfusion/ej2-buttons';\n\nFileManager.Inject(Toolbar, NavigationPane, DetailsView);\n\n/**\n * File Manager real time use case sample\n */\n\nexport function initFileManagerFileUpload(): void {\n\n    // Initialize the Uploader component\n    let uploadObject: Uploader = new Uploader();\n    uploadObject.appendTo('#fileupload');\n\n    // Initialize the Button component\n    let btnObj: Button = new Button();\n    btnObj.appendTo('#openBtn');\n\n    // Initialize the Dialog component\n    let dialogObj: Dialog = new Dialog({\n        header: 'Select a file',\n        showCloseIcon: true,\n        closeOnEscape: false,\n        width: '850px',\n        visible: false,\n        target: document.getElementById('target'),\n        animationSettings: { effect: 'None' },\n        open: dialogOpen,\n        close: dialogClose\n    });\n    dialogObj.appendTo('#dialog');\n\n    let hostUrl: string = 'https://physical-service.syncfusion.com/';\n\n    // Initialize the FileManager component\n    let filemanagerInstance: FileManager = new FileManager({\n        ajaxSettings: {\n            url: hostUrl + 'api/FileManager/FileOperations',\n            getImageUrl: hostUrl + 'api/FileManager/GetImage',\n            uploadUrl: hostUrl + 'api/FileManager/Upload',\n            downloadUrl: hostUrl + 'api/FileManager/Download'\n        },\n        allowMultiSelection: false,\n        toolbarSettings: {\n            items: ['NewFolder', 'Upload', 'Delete', 'Cut', 'Copy', 'Rename', 'SortBy', 'Refresh', 'Selection', 'View', 'Details']\n        },\n        contextMenuSettings: {\n            file: [ \"Cut\", \"Copy\", \"|\", \"Delete\", \"Download\", \"Rename\", \"|\", \"Details\"],\n            visible: true\n        },\n        fileOpen : onFileOpen\n    });\n    filemanagerInstance.appendTo('#fileManager');\n\n    document.getElementById('openBtn').onclick = (): void => {\n        dialogObj.show();\n        dialogOpen();\n        filemanagerInstance.path = '/';\n        filemanagerInstance.selectedItems = [];\n        filemanagerInstance.refresh();\n    };\n\n    // Uploader will be shown, if Dialog is closed\n    function dialogClose(): void {\n        document.getElementById('uploadContainer').style.display = 'block';\n    }\n\n    // Uploader will be hidden, if Dialog is opened\n    function dialogOpen(): void {\n        document.getElementById('uploadContainer').style.display = 'none';\n    }\n\n    // File Manager's fileOpen event function\n    function onFileOpen(args: FileOpenEventArgs): void {\n        let file: any = (args as any).fileDetails;\n        if (file.isFile) {\n            args.cancel = true;\n            if (file.size <= 0 ) { file.size = 10000; }\n            uploadObject.files = [{name: file.name, size: file.size, type: file.type }];\n            dialogObj.hide();\n        }\n    }\n}\n"
    }
  ]
}