zhanghai / zhanghai/MaterialFiles
[FEATURE] Add WebDAV Server Support
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 9k
- Forks
- 736
- PR merge metrics
- No merged PRs in 30d
Description
Please consider adding a built-in WebDAV server to Material Files. This would allow users to access and manage their mobile files by mounting their device's storage as a network drive on a desktop computer. This feature would serve as a modern and more powerful alternative to the existing MTP and FTP server functionalities.
Primary use-case: cross-device workflows
A key use case is for users of applications like Obsidian, who need seamless access to their notes vault from both their mobile device and a desktop. A WebDAV server allows the mobile storage to be mounted directly on a desktop file manager (e.g. macOS Finder, Dolphin, Nemo) or with a dedicated client (e.g., davfs2, Rclone, Mountain Duck).
This "direct mount" workflow provides a single source of truth, which is often preferable to file synchronization services like Syncthing, as it eliminates sync delays and potential version conflicts.
Advantages of WebDAV over FTP
While the current FTP server is useful, WebDAV is technically superior for mounting a device as a drive, offering a much better user experience due to:
- ✅ Efficiency: More efficient directory listings, especially for folders containing many files (like an Obsidian vault). It also supports partial file transfers (byte-range requests), which reduces latency.
- ✅ File Locking: A crucial feature that prevents file corruption or data loss from concurrent edits.
- ✅ Simplicity and Reliability: Operates over a single port using the robust and universal HTTP/S stack, which is more stable and firewall-friendly than FTP.
🟰 They both have the downside of not supporting non-ASCII chars.
Critical implementation detail: dot files visibility
For this feature to be fully effective, it is critical that the WebDAV server is configured to show hidden files and folders by default (i.e., those whose names begin with a dot).
Many applications, including Obsidian, rely on a hidden folder (e.g., .obsidian) to store configuration and metadata. Some existing WebDAV server implementations on Android fail to expose these "dotfiles," which severely limits their utility. Ensuring that hidden files are visible would make the Material Files implementation a best-in-class solution.
Thank you for considering this request.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing Material Files' existing MTP and FTP server functionality and how mobile storage is exposed over the network. Define the WebDAV server scope, including desktop mounting, file locking, partial transfers, authentication, and visibility of dot files such as .obsidian. Done means the feature works reliably for the described cross-device workflows and preserves hidden files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile-dev, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100