Webdav
Purpose and Use Case
The zbsync_webdav module adds the Webdav Grabber (zbs.grabber.webdav), which syncs files down from a WebDAV share to a local path and then reads matching files into the pipeline. There is currently no dedicated Webdav Dumper.
Webdav Connection
Before using the Webdav Grabber, create a Webdav Connection with:
| Field | Description |
|---|---|
| Hostname | WebDAV server URL, e.g. https://dav-pocket.appspot.com. |
| Webdav Login Name / Password | Login credentials. |
| Use Proxy | Enables proxy fields (Proxy Hostname, Proxy Login Name, Proxy Password). |
| Use SSL | Enables Certificate Path / Key Path fields for SSL client authentication. |
| Receive Speed / Send Speed | Download/upload rate limits in bytes per second (default 3,000,000 each). |
| Chunk Size | Transfer chunk size in bytes (default 65536). |
| Verbose | Enables verbose client logging. |
| Disable Check | Skips the WebDAV server capability check on connect. |
Webdav Grabber
Configuration
| Field | Description |
|---|---|
| Connection | The Webdav Connection to use. |
| Content Path | Remote path (file or directory) to sync down from the WebDAV server. |
| Local Path | Local filesystem path the remote content is synced into. Supports the same record-attribute expressions as other path fields, e.g. {record.filename}. |
| Path Expression Glob | Glob pattern applied against the synced local path to select which files to read (default *). |
| Content Type | Binary or Text — how file content is read after download. |
| Encoding | Text encoding used when Content Type is Text (default UTF8). |
| Limit | Maximum number of files to read (default 100). |
How It Works
- Connects to the WebDAV server and downloads (
download_sync) the content at Content Path into Local Path. - Globs the local path with the configured pattern, reading up to Limit matching files (directories are skipped) as binary or text depending on Content Type.
- Returns one record per file:
{"filepath", "filename", "content"}.
Usage and Best Practices
Common Pitfalls
- Local Path must be writable: the grabber downloads into Local Path before globbing it — make sure the path exists and the Odoo worker process can write to it.
- Glob applied locally, not remotely: Path Expression Glob filters the already-downloaded local files, not what gets synced from the server — a broad Content Path combined with a narrow glob still transfers everything under that path first.
- SSL/Proxy fields only apply when enabled: Certificate Path/Key Path and the proxy fields are ignored unless Use SSL/Use Proxy are checked on the Connection.
Performance Tips
- Tune Receive Speed and Chunk Size on the Connection if large syncs are saturating bandwidth or timing out.
- Narrow Content Path to the smallest directory that contains the needed files, since the full sync happens before the glob filter is applied.