{"id":31939605,"url":"https://github.com/github30/webdavjson","last_synced_at":"2026-04-12T09:01:51.474Z","repository":{"id":314439531,"uuid":"1055527165","full_name":"GitHub30/WebDAVJSON","owner":"GitHub30","description":"WebDAVJSON is a simple server-side script (PHP or Node.js) that gives you REST-style file management: list, upload, delete, download, all via JSON. Supports CORS, optional API key authentication, and file extension filtering.","archived":false,"fork":false,"pushed_at":"2025-09-19T11:33:55.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-09T03:57:23.553Z","etag":null,"topics":["cors","javascript","mkcert","nodejs","php","php7","php8","webdav","webdav-server","webdavjson","windows"],"latest_commit_sha":null,"homepage":"","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/GitHub30.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-12T11:54:36.000Z","updated_at":"2025-09-19T11:33:58.000Z","dependencies_parsed_at":"2025-09-12T13:41:31.198Z","dependency_job_id":"6f204552-06f6-4b77-bc7a-939cfbd7a180","html_url":"https://github.com/GitHub30/WebDAVJSON","commit_stats":null,"previous_names":["github30/webdavjson"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GitHub30/WebDAVJSON","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitHub30%2FWebDAVJSON","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitHub30%2FWebDAVJSON/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitHub30%2FWebDAVJSON/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitHub30%2FWebDAVJSON/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GitHub30","download_url":"https://codeload.github.com/GitHub30/WebDAVJSON/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitHub30%2FWebDAVJSON/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018302,"owners_count":26086345,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cors","javascript","mkcert","nodejs","php","php7","php8","webdav","webdav-server","webdavjson","windows"],"created_at":"2025-10-14T08:43:26.316Z","updated_at":"2025-10-14T08:43:29.254Z","avatar_url":"https://github.com/GitHub30.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PHP Tests](https://github.com/GitHub30/WebDAVJSON/actions/workflows/php-test.yml/badge.svg?branch=main)](https://github.com/GitHub30/WebDAVJSON/actions/workflows/php-test.yml)\n[![Node.js Tests](https://github.com/GitHub30/WebDAVJSON/actions/workflows/nodejs-test.yml/badge.svg?branch=main)](https://github.com/GitHub30/WebDAVJSON/actions/workflows/nodejs-test.yml)\n\n# WebDAVJSON\n\nWebDAVJSON is a simple PHP/Node.js script that provides file management APIs. It supports CORS, optional API key authentication, upload with extension restrictions, and JSON response for file listing.\n\n## Features\n- CORS support\n- Optional API key authentication\n- File listing (JSON)\n- File upload, download, and delete\n- Extension restrictions\n- Single-file program\n\n## Windows Setup\n\n```powershell\nwinget install mkcert Node.js --silent\nmkcert -install\nmkcert localhost\nnode index.mjs\n# await fetch('https://localhost:8443/').then(r=\u003er.json())\n# await fetch('https://localhost:8443/?filename=foo.txt', {method: 'PUT', body: 'foobar'})\n```\n\n## Linux Setup\n\n```bash\nwget https://raw.githubusercontent.com/GitHub30/WebDAVJSON/refs/heads/main/index.php\n```\n\n## API Endpoints\n\n| Method   | Path                        | Description             |\n|----------|-----------------------------|-------------------------|\n| GET      | /?filename=abc.txt          | Download file           |\n| GET      | /                           | List files (JSON)       |\n| POST/PUT | /                           | Upload file             |\n| POST/PUT | /?filename=abc.txt          | Binary upload           |\n| DELETE   | /?filename=abc.txt          | Delete file             |\n\n## Usage Examples\n\n### List files\n```bash\ncurl http://localhost/\n```\n\n### Search files (partial match)\n```bash\ncurl \"http://localhost/?q=abc\"\n```\n\n### Download file\n```bash\ncurl -O http://localhost/?filename=abc.txt\n```\n\n### Download file (as attachment)\n```bash\ncurl -OJ \"http://localhost/?download\u0026filename=abc.txt\"\n```\n\n### Upload file (multipart/form-data)\n```bash\ncurl -F \"file=@abc.txt\" http://localhost/\n```\n\n### Upload file (PUT, binary)\n```bash\ncurl -X PUT --data-binary @abc.txt \"http://localhost/?filename=abc.txt\"\n```\n\n```javascript\nconst blob = await fetch($0.src).then(r=\u003er.blob())\nawait fetch('https://localhost:8443/?filename=image.png', {method: 'POST', body: blob})\n```\n\n### Delete file\n```bash\ncurl -X DELETE \"http://localhost/?filename=abc.txt\"\n```\n\n## Authentication (API Key)\nIf you set a value for `$api_key` in `index.php`, the header `Authorization: Bearer \u003cAPI_KEY\u003e` is required.\n\nExample:\n```bash\ncurl -H \"Authorization: Bearer your_api_key\" http://localhost/\n```\n\n## Allowed Extensions\n`txt, jpg, png, webp, heic, gif, pdf, docx, xlsx, zip, mp4, gz`\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub30%2Fwebdavjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub30%2Fwebdavjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub30%2Fwebdavjson/lists"}