{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "file-manager-pass-custom-value-to-server",
  "framework": "react",
  "type": "registry:component",
  "component": "FileManager",
  "variant": "pass-custom-value-to-server",
  "dependencies": [
    "@syncfusion/ej2-react-filemanager"
  ],
  "description": "File manager that sends a custom value to the server with file, download and image requests.",
  "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/react/llms.txt",
    "skillPack": "syncfusion/react-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/react/js/file-manager-pass-custom-value-to-server.md"
  },
  "files": [
    {
      "target": "src/components/file-manager-pass-custom-value-to-server/FileManager.jsx",
      "content": "import { FileManagerComponent, Inject, NavigationPane, DetailsView, Toolbar } from '@syncfusion/ej2-react-filemanager';\n/**\n * File Manager sample that passes a custom value to the server\n */\nconst PassCustomValueToServer = () => {\n    let hostUrl = \"https://physical-service.syncfusion.com/\";\n    function onBeforeSend(args) {\n        if (args.ajaxSettings) {\n            args.ajaxSettings.beforeSend = function (args) {\n                args.httpRequest.setRequestHeader('Authorization', 'User1');\n            };\n        }\n    }\n    function onBeforeDownload(args) {\n        args.useFormPost = false;\n        if (args.ajaxSettings) {\n            args.ajaxSettings.beforeSend = function (args) {\n                args.fetchRequest.headers.append('Authorization', 'User1');\n            };\n        }\n    }\n    function onBeforeImageLoad(args) {\n        args.useImageAsUrl = false;\n        // Check if ajaxSettings are present in the arguments\n        if (args.ajaxSettings) {\n            (args.ajaxSettings).beforeSend = function (args) {\n                // Append Authorization header with value 'User1' to fetchRequest headers\n                args.fetchRequest.headers.append('Authorization', 'User1');\n            };\n        }\n    }\n    return (<div>\n            <div className=\"control-section\">\n                <FileManagerComponent id=\"file\" ajaxSettings={{\n            url: hostUrl + \"api/FileManager/FileOperations\",\n            downloadUrl: hostUrl + \"api/FileManager/Download\",\n            uploadUrl: hostUrl + \"api/FileManager/Upload\",\n            getImageUrl: hostUrl + \"api/FileManager/GetImage\"\n        }} beforeSend={onBeforeSend.bind(this)} beforeDownload={onBeforeDownload.bind(this)} beforeImageLoad={onBeforeImageLoad.bind(this)}>\n                    <Inject services={[NavigationPane, DetailsView, Toolbar]}/>\n                </FileManagerComponent>\n            </div>\n        </div>);\n};\nexport default PassCustomValueToServer;\n"
    }
  ]
}