{"id":20299347,"url":"https://github.com/kd2org/webdav-manager.js","last_synced_at":"2025-10-18T23:21:21.483Z","repository":{"id":146808070,"uuid":"548547202","full_name":"kd2org/webdav-manager.js","owner":"kd2org","description":"Lightweight JS WebDAV client","archived":false,"fork":false,"pushed_at":"2025-01-05T03:20:04.000Z","size":360,"stargazers_count":44,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-25T09:47:27.445Z","etag":null,"topics":["file-browser","javascript","js","webdav","webdav-client"],"latest_commit_sha":null,"homepage":"https://fossil.kd2.org/webdav-manager/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kd2org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-10-09T19:44:57.000Z","updated_at":"2025-03-20T17:20:00.000Z","dependencies_parsed_at":"2025-01-04T00:19:27.333Z","dependency_job_id":"79ae027b-cce1-486d-9506-360b4cbc3254","html_url":"https://github.com/kd2org/webdav-manager.js","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/kd2org%2Fwebdav-manager.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kd2org%2Fwebdav-manager.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kd2org%2Fwebdav-manager.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kd2org%2Fwebdav-manager.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kd2org","download_url":"https://codeload.github.com/kd2org/webdav-manager.js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248406553,"owners_count":21098241,"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":["file-browser","javascript","js","webdav","webdav-client"],"created_at":"2024-11-14T16:14:23.909Z","updated_at":"2025-10-18T23:21:16.452Z","avatar_url":"https://github.com/kd2org.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebDAV Manager, a lightweight JS WebDAV client\n\nThis is drop-in JS client that you can use to enhance the web interface of a WebDAV file server. Or you can use it on your computer to access any WebDAV server without installing anything.\n\n![](scr_desktop.png)\n![](scr_mobile.png)\n\n* Fossil development repo: \u003chttps://fossil.kd2.org/webdav-manager/\u003e\n* Git mirror: \u003chttps://github.com/kd2org/webdav-manager.js\u003e\n\n## Features\n\n* Order files by name, date, or size\n* Create new directories\n* Create and edit text file\n* Delete files and directories\n* Rename and move files and directories\n* Upload files directly from browser\n* Upload files using copy and paste!\n* Upload files with drag and drop\n* Preview of images, text, videos, audio, MarkDown and PDF\n* [MarkDown live preview when editing MarkDown files](scr_markdown.png)\n* Support for viewing/editing document files via WOPI clients (OnlyOffice, Collabora Online, MS Office)\n* Download files individually\n* Download all the files of a directory at once\n* Localization support\n* Responsive: works with mobiles and desktop browsers\n* Support for light and dark theme\n* Only 8KB gzipped!\n* Single file, self-contained, no dependencies, no silly NPM stuff!\n\n### Planned features\n\n* Select multiple items to move/delete\n* Upload progress status for large files\n* [Resumable upload via TUS](https://tus.io/protocols/resumable-upload.html) to upload large files\n\n## Compatibility\n\nThis has been tested with the following servers:\n\n* [KaraDAV](https://github.com/kd2org/karadav/)\n* Apache 2.4 mod_dav\n* NextCloud\n\n## Demo\n\nYou can try the demo live at [https://kd2org.github.io/webdav-manager.js/demo.html](https://kd2org.github.io/webdav-manager.js/demo.html).\n\nYou can review the source code in this repo: the password is never stored, and only sent to the WebDAV server as part of basic auth.\n\nThis demo will only work with a WebDAV server that allows cross-origin requests (see section on CORS below).\n\n## Usage\n\nIf your HTML page has a `data-webdav-url` attribute, the file manager will open up automatically using this URL when loading the javascript:\n\n```\n\u003chtml data-webdav-url=\"http://localhost:8080/dav/files/user/\"\u003e\n\u003cbody\u003e\n\u003cscript type=\"text/javascript\" src=\"webdav.js\"\u003e\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nIf you want to specify extra options, you can also just call the `WebDAVNavigator` function, the fist parameter being the WebDAV URL and the second being an object defining options.\n\n```\nWebDAVNavigator('http://localhost:8080/dav/', {'user': 'demo', 'password': 'abcd'});\n```\n\n### Options\n\n* `user`: HTTP basic auth user name\n* `password`: HTTP basic auth user password (not required if the HTML page is already in a password-protected directory)\n* `wopi_host_url`: URL of the WOPI host to edit Office documents\n* `wopi_discovery_url`: URL of the WOPI discovery XML, used to edit Office documents\n\n## Install as the client for your WebDAV server\n\nJust copy the `webdav.js`, `webdav.css` and `index.html` files to the root of your web server.\n\nEdit the `index.html` file and change `data-webdav-url=\"/dav/\"` to the actual web path of your WebDAV server. For example with ownCloud this might be `data-webdav-url=\"/owncloud/remote.php/webdav/\"`.\n\n### With Apache\n\nFollow a [tutorial to setup WebDAV in your Apache](https://www.digitalocean.com/community/tutorials/how-to-configure-webdav-access-with-apache-on-ubuntu-18-04) and change the virtual host to something like that:\n\n```\n\u003cVirtualHost *:80\u003e\n\tServerName webdav.localhost\n\tDocumentRoot /home/web/webdav-manager.js\n\tDAVLockDB /home/web/davlock.db\n\n\t# Actually store files in /home/web/data\n\tAlias /dav /home/web/data\n\n\t\u003cLocation /\u003e\n\t\tAuthType Basic\n\t\tAuthName \"webdav\"\n\t\tAuthUserFile /home/web/users.htpasswd\n\t\tRequire valid-user\n\t\u003c/Location\u003e\n\u003c/VirtualHost\u003e\n\n\u003cDirectory /home/web/data\u003e\n\t# Disable handlers\n\t\u003cFilesMatch \".+\\.*$\"\u003e\n\t\tSetHandler !\n\t\u003c/FilesMatch\u003e\n\n\t# Disable PHP\n\t\u003cIfModule mod_php.c\u003e\n\t\tphp_flag engine off\n\t\u003c/IfModule\u003e\n\n\tDAV On\n\n\t# Magic: use WebDAV manager for directory listings\n\tRewriteEngine On\n\tRewriteCond %{REQUEST_METHOD} GET\n\tRewriteRule .*\\/$|^$ /\n\u003c/Directory\u003e\n```\n\n## Install as a local client\n\nJust copy the `webdav.js`, `webdav.css` and `demo.html` pages to a directory on your computer, open `demo.html` with a web browser, then fill-in the server URL, user login and password, and you'll be connected :)\n\n### CORS\n\nFor the client to work in this mode, your WebDAV server MUST set the following HTTP headers for `OPTIONS` requests:\n\n```\nAccess-Control-Allow-Origin: *\nAccess-Control-Allow-Credentials: true\nAccess-Control-Allow-Headers: Authorization, *\nAccess-Control-Allow-Methods: GET,HEAD,PUT,DELETE,COPY,MOVE,PROPFIND,MKCOL,LOCK,UNLOCK\n```\n\nIf your server doesn't set these headers, you won't be able to use this client, this is a security limitation of web browsers.\n\n### NextCloud\n\nAs an example, here is the Apache configuration that will allow your local client to make requests to a NextCloud server:\n\n```\n\u003cLocation /remote.php\u003e\n\t\u003cLimit OPTIONS\u003e\n\t\tHeader always set Access-Control-Allow-Origin \"*\"\n\t\tHeader always set Access-Control-Allow-Credentials \"true\"\n\t\tHeader always set Access-Control-Allow-Headers \"Authorization, *\"\n\t\tHeader always set Access-Control-Allow-Methods \"GET,HEAD,PUT,DELETE,COPY,MOVE,PROPFIND,MKCOL,LOCK,UNLOCK\"\n\t\tHeader always set Allow \"GET,HEAD,PUT,DELETE,COPY,MOVE,PROPFIND,MKCOL,LOCK,UNLOCK\"\n\t\u003c/Limit\u003e\n\n\tRewriteEngine On\n\tRewriteCond %{REQUEST_METHOD} OPTIONS\n\tRewriteRule ^(.*)$ $1 [R=200,L]\n\u003c/Location\u003e\n```\n\n## License\n\nThis software is available as:\n\n* GNU Affero GPL v3 (this repo)\n* A commercial license to include in proprietary products\n\nContact us :)\n\n## Authors\n\n* KD2.org / BohwaZ \u003chttps://bohwaz.net/\u003e 2022\n\n## Other solutions\n\n* [webdav-js](https://github.com/dom111/webdav-js)\n* [WebDavFileTree](https://github.com/Kysic/webdavFileTree)\n* [WebDAV Drive](https://github.com/club-1/webdav-drive)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkd2org%2Fwebdav-manager.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkd2org%2Fwebdav-manager.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkd2org%2Fwebdav-manager.js/lists"}