{"id":37012879,"url":"https://github.com/hummingbird-dev/webdav-fileselector","last_synced_at":"2026-01-14T01:14:59.045Z","repository":{"id":56987089,"uuid":"150263962","full_name":"hummingbird-dev/webdav-fileselector","owner":"hummingbird-dev","description":"A Laravel package for showing and selecting files and folders of a WebDAV server.","archived":false,"fork":false,"pushed_at":"2019-03-19T19:46:40.000Z","size":1097,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-19T12:38:08.375Z","etag":null,"topics":["laravel","php","webdav"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hummingbird-dev.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}},"created_at":"2018-09-25T12:46:01.000Z","updated_at":"2023-07-15T12:55:07.000Z","dependencies_parsed_at":"2022-08-21T13:20:22.926Z","dependency_job_id":null,"html_url":"https://github.com/hummingbird-dev/webdav-fileselector","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/hummingbird-dev/webdav-fileselector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hummingbird-dev%2Fwebdav-fileselector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hummingbird-dev%2Fwebdav-fileselector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hummingbird-dev%2Fwebdav-fileselector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hummingbird-dev%2Fwebdav-fileselector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hummingbird-dev","download_url":"https://codeload.github.com/hummingbird-dev/webdav-fileselector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hummingbird-dev%2Fwebdav-fileselector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28407661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T00:40:43.272Z","status":"ssl_error","status_checked_at":"2026-01-14T00:40:42.636Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["laravel","php","webdav"],"created_at":"2026-01-14T01:14:58.434Z","updated_at":"2026-01-14T01:14:59.037Z","avatar_url":"https://github.com/hummingbird-dev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webdav-fileselector\n\nA Laravel package for showing and selecting files and folders of a WebDAV server.\n\n## Features\n\n- Retrieve a list of files and folders from a WebDAV server\n- Use WebDAV API: *propfind*\n- No mounting\n- Fast\n- Supports multi-user\n- Supports external usage as API\n- Provides a sophisticated client template using the [hummingbird-treeview](https://github.com/hummingbird-dev/hummingbird-treeview) package\n- Display files and folders in a hierarchical tree structure\n- Different options can be enabled / disabled, e.g. \n  - select only one file\n  - select one or more files\n  - select whole folders\n  - select all\n- Filter for file types (e.g. .jpg, .txt) and arbitrary patterns\n- Convenient search function\n- ... and many more\n\n\n## Dependencies\n\n- Laravel 5.5.*\n- PHP 7.0\n- cURL extension enabled\n\n## Included libraries\n\n- jQuery 3.3.1\n- bootstrap 4.0.0\n- font-awesome\n- hummingbird-dev/hummingbird-treeview\n\nThis means that these libraries (or parts of them) are included in the\nwebdav-fileselector package. Thus no download / installation of these libraries is needed.\n\n## Getting started\n### Installation\n\nInstall via composer and run the command below in the root of your project:\n\n```bash\ncomposer require hummingbird-dev/webdav-fileselector\n\n```\n\nAdd the following under *autoload* to your composer.json (that one in your projects root directory):\n\n``` php\n...\n\"autoload\": {\n   ...\n   \"psr-4\": {\n      \"App\\\\\": \"app/\",\n      \"HummingbirdDev\\\\WebdavFileselector\\\\\":\"vendor/hummingbird-dev/webdav-fileselector/src/\"\n   }\n   ...\n},\n\n```\n\nUpdate *composer* from the root of your project:\n\n```bash\ncomposer update\n\n```\n\nPublish resources from your root folder:\n\n```bash\nphp artisan vendor:publish --provider=\"HummingbirdDev\\\\WebdavFileselector\\\\WebdavFileselectorServiceProvider\"\n\n```\n\n\n## Usage\n\nStart a local development server\n\n``` php\nphp artisan serve\n\n```\n\nand navigate to http://localhost:8000/webdav-fileselector-get\n\nYou will see the client template, which can be edited at \"/resources/views/hummingbird-dev/webdav-fileselector.blade.php\".\n\n\n\nTwo possibilities exist to include the needed WebDAV credentials and\nto submit optional settings.\n\nFirst, the client at\n\"/resources/views/hummingbird-dev/webdav-fileselector.blade.php\" can\nbe edited or an additional POST form on any other page can be used to call the client. This form may look like:\n\n``` html\n\u003cform method=\"POST\" action=\"http://localhost:8000/webdav-fileselector-get\"\u003e\n\t\u003cinput type=\"hidden\" name=\"b2drop_username\" value=\"smieruch\"\u003e\n\t\u003cinput type=\"hidden\" name=\"b2drop_password\" value=\"password\"\u003e\n\t\u003cinput type=\"hidden\" name=\"b2drop_url\" value=\"http://localhost:8099/remote.php/webdav/\"\u003e\n\t\u003cinput type=\"hidden\" name=\"select_only_one_item\" value=\"1\"\u003e\n\t\u003cinput type=\"hidden\" name=\"show_only_parent_folder\" value=\"0\"\u003e\n\t\u003cinput type=\"hidden\" name=\"disable_folder_checking\" value=\"1\"\u003e\n\t\u003cinput type=\"hidden\" name=\"disable_root_node\" value=\"0\"\u003e\n\t\u003cinput type=\"hidden\" name=\"getChecked_onlyEndNodes\" value=\"1\"\u003e\n\t\u003cinput type=\"hidden\" name=\"filter\" value=\"\"\u003e\n\t\u003cinput type=\"hidden\" name=\"fileselector_height\" value=\"300\"\u003e\n\t\u003cinput type=\"hidden\" name=\"minimal_view\" value=\"0\"\u003e\n\t\u003cinput type=\"hidden\" name=\"jumbotron\" value=\"1\"\u003e\n\t\u003cbutton type=\"submit\"\u003eStart Fileselector\u003c/button\u003e\n\u003c/form\u003e\n\n```\n\n## webdav-fileselector as a service\n\nThe interesting point here is that this HTML form can be implemented on any other web page. So it's possible\nto provide this service on other web projects. One possibility for integration would be an iframe. That means, placing\nan iframe onto the page:\n\n``` html\n\u003ciframe name=\"my_iframe\" width=\"100%\" height=\"400px\" src=\"\"\u003e\u003c/iframe\u003e\n\n```\nand pointing the form to the iframe with the \"target\" attribute, which means to open the response of the form POST in the iframe:\n\n``` html\n\u003cform method=\"POST\" action=\"http://localhost:8000/webdav-fileselector-get\" target=\"my_iframe\"\u003e\n\t\u003cinput type=\"hidden\" name=\"b2drop_username\" value=\"smieruch\"\u003e\n\t\u003cinput type=\"hidden\" name=\"b2drop_password\" value=\"password\"\u003e\n\t...\n```\n\n## Parameters\n\nFollowing parameters are mendatory:\n\n- **b2drop_username**\u003cbr\u003e\n  This is the username needed to login to the WebDAV server.\n\n- **b2drop_password**\u003cbr\u003e\n  The corresponding password needed to login to the WebDAV server.\n\n- **b2drop_url**\u003cbr\u003e \n  The URL to the WebDAV server. If it is e.g. an\n  *ownCloud* or *nextCloud* instance, the URL is *https://example.com/remote.php/webdav*.\n  \n\nFollowing settings are optional and have all default values. These settings influence mostly the\nfunctionality of the *hummingbird-treeview*, which is used to show the files and folders.\nAll *values* of these settings are strings, although many behave like boolean *true* and *false*.\n\n- **select_only_one_item**\u003cbr\u003e\n  This parameter can be enabled by *value=\"1\"* or disabled by *value=\"0\"*. Default is *value=\"1\"*. If activated,\n  only single items in the treeview can be checked. This provides the typical feature, where\n  the user is only allowed to select a single file instead of multiple. It is important to note\n  that the parameter **disable_folder_checking** should be enabled as well.\n  \n- **disable_folder_checking**\u003cbr\u003e\n  To disable the functionality to check whole folders this parameter has to be \n  set to *value=\"1\"* otherwise *value=\"0\"* has to be used. Default is *value=\"1\"*. Activating this parameter is needed,\n  if the above parameter **select_only_one_item** is also activated to restrict the \n  selection of items to single files.\n  \n- **show_only_parent_folder**\u003cbr\u003e\n  This is a special parameter and can be activated by setting *value=\"1\"* or disabled by *value=\"0\"*. Default is *value=\"0\"*.\n  If activated the returned *List* (details below) does not contain the selected files, but instead only\n  the folder, which contains the selected files, i.e. the parent folder.\n\n- **disable_root_node**\u003cbr\u003e\n  Again, this setting can be activated by *value=\"1\"* and deactivated by *value=\"0\"*. Default is *value=\"0\"*. If activated\n  the root node is disabled, which means it cannot be checked. \n  \n- **getChecked_onlyEndNodes**\u003cbr\u003e\n  This is an important parameter and activated by *value=\"1\"* and deactivated by *value=\"0\"*. Default is *value=\"1\"*. If\n  activated the returned *List* (details below) contains only the checked files and NOT the checked folders.\n  \n- **filter**\u003cbr\u003e\n  Filtering is a powerful option to select only certain files. For instance if *value=\".txt\"* only files containing \".txt\"\n  in their names are shown. Default is an empty string *value=\"\"*, which means no filtering. If *value=\"myfile\"* only \n  files containing \"myfile\" in the name are shown. Additionally it is possible to filter\n  for multiple strings in a \"OR\" sense. If *value=\".jpg|.png|.bmp\"* only files are shown containing \".jpg\" or \".png\" or \".bmp\".\n  \n- **fileselector_height**\n  This parameter defines the height in px of the ```\u003cdiv\u003e```, where the *hummingbird-treeview* is embedded. It is scollable, thus the height\n  can be chosen small if needed. Default is *value=\"400\"* pixel.\n  \n- **minimal_view** \n  If activated by *value=\"1\"* (deactivate by *value=\"0\"*) only a heading, the search field and the treeview are shown. \n  Otherwise a little more markup is included. Default is *value=\"0\"*.\n\n- **jumbotron**\n  This option, if *value=\"1\"* places the treeview on a Bootstrap Jumbotron, i.e. essentially a gray block.\n  \n  \n## Events -- grabbing the selected files\n\nOn every file check or uncheck on the *hummingbird-treeview* an event is fired including the selected files.\nAs can be seen in the file *webdav-fileselector.blade.php* there is a small JavaScript snippet at the end of the file:\n\n``` javascript\n window.addEventListener(\"message\",function(e) {\n     //console.log(\"message event\",e);\n     var key = e.message ? \"message\" : \"data\";\n     data = e[key];\n     console.log(\"file_path= \" + data.dataid)\n     console.log(\"file_id= \" + data.id)\n     console.log(\"file_text= \" + data.text)\n },false);\n\n```\n\nThis JavaScript code grabs the *List* of the selected files, which are\nstored here in the object *data*. This object contains arrays, whereas\n*data.dataid* contains the full paths to the selected files. The\n*data.id* contains an id, which is essentially a string together with\na running number and not important here. The *data.text* contains the\ntext shown in the *treeview*, which is mostly similar to the real filename.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhummingbird-dev%2Fwebdav-fileselector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhummingbird-dev%2Fwebdav-fileselector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhummingbird-dev%2Fwebdav-fileselector/lists"}