Provider: WebDAV #14

Open
opened 2026-03-27 21:57:02 +00:00 by antialias · 0 comments
Owner

WebDAV photo source provider. Useful for Nextcloud, ownCloud, Synology WebDAV, Box, and other WebDAV-compatible storage.

Config Schema

{
  "url": { "type": "string", "required": true, "description": "WebDAV server URL (e.g. https://cloud.example.com/remote.php/dav/files/user/)" },
  "username": { "type": "string", "required": true },
  "password": { "type": "string", "secret": true },
  "path": { "type": "string", "default": "/", "description": "Directory path within the WebDAV share" },
  "recursive": { "type": "boolean", "default": true }
}

Implementation Notes

  • Use the webdavclient3 library or raw PROPFIND/GET requests with requests
  • list_photos() does a PROPFIND with Depth: infinity (or recursive Depth: 1 calls) to enumerate files
  • Filter by extension and content-type
  • get_photo() does a GET request, loads into PIL
  • PhotoRef.id = relative path from configured root
  • PhotoRef.date = getlastmodified property from PROPFIND response

Specific Platform Notes

  • Nextcloud: WebDAV URL is https://host/remote.php/dav/files/{username}/
  • Synology DSM: Enable WebDAV in Package Center, URL is https://nas:5006/ (port 5006 for HTTPS)
  • Box: WebDAV URL is https://dav.box.com/dav/

Dependencies

  • requests (already a Flask dependency)

No additional libraries strictly needed — WebDAV is just HTTP with PROPFIND/PROPPATCH. Using raw requests with XML parsing avoids adding another dependency.

Depends on #9 (core architecture).

WebDAV photo source provider. Useful for Nextcloud, ownCloud, Synology WebDAV, Box, and other WebDAV-compatible storage. ## Config Schema ```json { "url": { "type": "string", "required": true, "description": "WebDAV server URL (e.g. https://cloud.example.com/remote.php/dav/files/user/)" }, "username": { "type": "string", "required": true }, "password": { "type": "string", "secret": true }, "path": { "type": "string", "default": "/", "description": "Directory path within the WebDAV share" }, "recursive": { "type": "boolean", "default": true } } ``` ## Implementation Notes - Use the `webdavclient3` library or raw `PROPFIND`/`GET` requests with `requests` - `list_photos()` does a `PROPFIND` with `Depth: infinity` (or recursive `Depth: 1` calls) to enumerate files - Filter by extension and content-type - `get_photo()` does a `GET` request, loads into PIL - `PhotoRef.id` = relative path from configured root - `PhotoRef.date` = `getlastmodified` property from PROPFIND response ## Specific Platform Notes - **Nextcloud**: WebDAV URL is `https://host/remote.php/dav/files/{username}/` - **Synology DSM**: Enable WebDAV in Package Center, URL is `https://nas:5006/` (port 5006 for HTTPS) - **Box**: WebDAV URL is `https://dav.box.com/dav/` ## Dependencies - `requests` (already a Flask dependency) No additional libraries strictly needed — WebDAV is just HTTP with PROPFIND/PROPPATCH. Using raw `requests` with XML parsing avoids adding another dependency. Depends on #9 (core architecture).
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: antialias/eink-photo-frame#14