Zum Hauptinhalt springen

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:

FieldDescription
HostnameWebDAV server URL, e.g. https://dav-pocket.appspot.com.
Webdav Login Name / PasswordLogin credentials.
Use ProxyEnables proxy fields (Proxy Hostname, Proxy Login Name, Proxy Password).
Use SSLEnables Certificate Path / Key Path fields for SSL client authentication.
Receive Speed / Send SpeedDownload/upload rate limits in bytes per second (default 3,000,000 each).
Chunk SizeTransfer chunk size in bytes (default 65536).
VerboseEnables verbose client logging.
Disable CheckSkips the WebDAV server capability check on connect.

Webdav Grabber

Configuration

FieldDescription
ConnectionThe Webdav Connection to use.
Content PathRemote path (file or directory) to sync down from the WebDAV server.
Local PathLocal filesystem path the remote content is synced into. Supports the same record-attribute expressions as other path fields, e.g. {record.filename}.
Path Expression GlobGlob pattern applied against the synced local path to select which files to read (default *).
Content TypeBinary or Text — how file content is read after download.
EncodingText encoding used when Content Type is Text (default UTF8).
LimitMaximum 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.