{"id":23060771,"url":"https://github.com/syncfusionexamples/ej2-filemanager-node-filesystem","last_synced_at":"2025-04-07T05:09:32.058Z","repository":{"id":35013093,"uuid":"194651652","full_name":"SyncfusionExamples/ej2-filemanager-node-filesystem","owner":"SyncfusionExamples","description":"This repository contains the Node JS file system provider for the file manager component.","archived":false,"fork":false,"pushed_at":"2024-12-11T09:55:31.000Z","size":100,"stargazers_count":24,"open_issues_count":6,"forks_count":26,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T04:07:03.235Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SyncfusionExamples.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-01T10:28:50.000Z","updated_at":"2025-01-26T13:43:18.000Z","dependencies_parsed_at":"2024-12-11T10:29:51.267Z","dependency_job_id":"d42dd782-60d1-413b-9edf-e525a86b30db","html_url":"https://github.com/SyncfusionExamples/ej2-filemanager-node-filesystem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2Fej2-filemanager-node-filesystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2Fej2-filemanager-node-filesystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2Fej2-filemanager-node-filesystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2Fej2-filemanager-node-filesystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SyncfusionExamples","download_url":"https://codeload.github.com/SyncfusionExamples/ej2-filemanager-node-filesystem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595334,"owners_count":20963943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-16T03:15:14.731Z","updated_at":"2025-04-07T05:09:32.041Z","avatar_url":"https://github.com/SyncfusionExamples.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NodeJS file system providers for Essential JS 2 File Manager \n\nThis repository contains the nodeJS file system provider used for Essential JS 2 File Manager component.\n\n## Key Features\n\nThe Node.js file system provider module allows you to work with the physical file system. It also provides the methods for performing various file actions like creating a new folder, renaming files, and deleting files.\n\nNodeJs File System Provider Serves the file system providers support for the  FileManager component with the NodeJS.\n\nThe following actions can be performed with NodeJS file system provider.\n\n| **Actions** | **Description** |\n| --- | --- |\n| Read      | Reads the files from NodeJS file system. |\n| Details   | Gets the file's details which consists of Type, Size, Location and Modified date. |\n| Download  | Downloads the selected file or folder from NodeJS file system. |\n| Upload    | Uploads a file in NodeJS file system. It accepts uploaded media with the following characteristics: \u003cul\u003e\u003cli\u003eMaximum file size:  30MB\u003c/li\u003e\u003cli\u003eAccepted Media MIME types: `*/*` \u003c/li\u003e\u003c/ul\u003e |\n| Create    | Creates a New folder. |\n| Delete    | Deletes a folder or file. |\n| Copy      | Copys the selected files or folders from target. |\n| Move      | Moves the files or folders to the desired location. |\n| Rename    | Renames a folder or file. |\n| Search    | Full-text questions perform linguistic searches against text data in full-text indexes by operating on words and phrases. |\n\n## Access Control\n\nThe EJ2 FileManager allows you to define access permissions for files and folders using a set of access rules to user(s). The rules and roles should be specified in the `accessRules.json` available in the root folder of the package. The following table represents the access rule properties available for the files and folders.\n\n| **Properties** | **Description** |\n| --- | --- |\n| Read          | Allows access to read a file or folder. |\n| Write         | Allows permission to edit a file or folder. |\n| WriteContents | Allows permission to edit the content of folder. |\n| Copy          | Allows permission to copy a file or folder. |\n| Download      | Allows permission to download a file or folder. |\n| Upload        | Allows permission to upload into the folder. |\n| IsFile        | Specifies whether the rule is specified for folder or file. |\n| Role          | Specifies the role to which the rule is applied. |\n| Path          | Specifies the path to apply the rules which are defined. |\n\nFor Example\n```sh\n{\n    \"role\": \"Administator\",\n    \"rules\":[\n        //Denies downloading the 'Videos' folder.\n        {\"path\":\"/Videos/\", \"isFile\": false,\"role\": \"Administator\", \"download\": \"deny\"},\n        //Denies uploading files in all folders under 'Pictures' by displaying a custom access denied message.\n        {\"path\":\"/Pictures/*\",\"isFile\": false, \"role\": \"Administator\",\"upload\": \"deny\",\"message\":\"you don't have permission for this, Contact admisinistrator for access.\"  },\n        //Denies deleting and renaming all files in 'Downloads' folder.\n        {\"path\":\"/Downloads/*.*\",\"isFile\":true, \"role\": \"Administator\",\"write\": \"deny\", },\n        //Denies opening all 'png' files in 'Employees' folder.\n        {\"path\":\"/Pictures/Employees/*.png\",\"isFile\":true, \"role\": \"Administator\",\"read\": \"deny\" },\n        //Denies downloading all files with name 'FileManager' in 'Documents' folder.\n        {\"path\":\"/Documents/FileManager.*\",\"isFile\":true, \"role\": \"Administator\", \"download\": \"deny\", \"message\":\"you don't have permission for this, Contact admisinistrator for access.\"  },\n    ]\n}\n```\n\n\n## How to configure a web service\n\nFollow the below set of commands to configure the nodeJS file system providers. \n\n- To install ej2-filemanager-node-filesystem package, use the following command.\n\n```sh\n \n  npm install @syncfusion/ej2-filemanager-node-filesystem\n\n```\n\n- To install the depend packages for the file system provider, navigate to @syncfusion/ej2-filemanager-node-filesystem folder within the node_modules and run the below command \n\n```sh\n \n  npm install\n\n```\n\n* Now, run the below command line to check the Node API service in local and will be started in `http://localhost:8090/`. By default the nodeJS directory service is configured with `C:/Users`. \n\n### To configure the directory\n\n* To change the directory use flag `-d` like this `-d D:/Projects`\n \n### To configure the port\n\n* To change the port use like this `set PORT=3000`\n\nFor example: \n\n```sh\nset PORT=3000 \u0026\u0026 node filesystem-server.js -d D:/Projects\n```\n\n### start the service\n\nTo start the service use this command,\n\n```sh\nnpm start\n```\n\n## File Manager AjaxSettings\n\nTo access the basic actions like Read, Delete, Copy, Move, Rename, Search, and Get Details of File Manager using NodeJS file system service, just map the following code snippet in the Ajaxsettings property of File Manager.\n\nHere, the `hostUrl` will be your locally hosted port number.\n\n```\n  var hostUrl = http://localhost:8090/;\n        ajaxSettings: {\n            url: hostUrl,\n        }\n```\n\n## File download AjaxSettings\n\nTo perform download operation, initialize the `downloadUrl` property in ajaxSettings of the File Manager component.\n\n```\n  var hostUrl = http://localhost:8090/;\n  ajaxSettings: {\n            url: hostUrl,\n            downloadUrl: hostUrl + 'Download'\n        },\n```\n\n## File upload AjaxSettings\n\nTo perform upload operation, initialize the `uploadUrl` property in ajaxSettings of the File Manager component.\n\n```\n  var hostUrl = http://localhost:8090/;\n  ajaxSettings: {\n            url: hostUrl,\n            uploadUrl: hostUrl + 'Upload'\n        },\n```\n\n## File image preview AjaxSettings\n\nTo perform image preview support in the File Manager component, initialize the `getImageUrl` property in ajaxSettings of the File Manager component.\n\n```\n  var hostUrl = http://localhost:8090/;\n  ajaxSettings: {\n            url: hostUrl,\n            getImageUrl: hostUrl + 'GetImage'\n        },\n```\n\nThe FileManager will be rendered as follows.\n\n![File Manager](https://ej2.syncfusion.com/products/images/file-manager/readme.gif)\n\n## Support\n\nProduct support is available for through following mediums.\n\n* Creating incident in Syncfusion [Direct-trac](https://www.syncfusion.com/support/directtrac/incidents?utm_source=npm\u0026utm_campaign=filemanager) support system or [Community forum](https://www.syncfusion.com/forums/essential-js2?utm_source=npm\u0026utm_campaign=filemanager).\n* New [GitHub issue](https://github.com/syncfusion/ej2-javascript-ui-controls/issues/new).\n* Ask your query in [Stack Overflow](https://stackoverflow.com/?utm_source=npm\u0026utm_campaign=filemanager) with tag `syncfusion` and `ej2`.\n\n## License\n\nCheck the license detail [here](https://github.com/syncfusion/ej2-javascript-ui-controls/blob/master/license).\n\n## Changelog\n\nCheck the changelog [here](https://github.com/syncfusion/ej2-javascript-ui-controls/blob/master/controls/filemanager/CHANGELOG.md)\n\n© Copyright 2020 Syncfusion, Inc. All Rights Reserved. The Syncfusion Essential Studio license and copyright applies to this distribution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncfusionexamples%2Fej2-filemanager-node-filesystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyncfusionexamples%2Fej2-filemanager-node-filesystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncfusionexamples%2Fej2-filemanager-node-filesystem/lists"}