Any document store served over WebDAV (RFC 4918), for a Clojure backend whose browser clients sync through their own origin.
The documents of the store are the members of one collection, which webdav-clj's handler serves with ETags and preconditions: GET, HEAD, PUT, DELETE, PROPFIND, OPTIONS, and COPY and MOVE from one document to another. A store without :put, :list or :delete takes no PUT, gives no listing or takes no DELETE, and a client of it leaves the same keys out of its WebDAV store.
Any document store served over WebDAV (RFC 4918), for a Clojure backend whose browser clients sync through their own origin. The documents of the store are the members of one collection, which webdav-clj's handler serves with ETags and preconditions: GET, HEAD, PUT, DELETE, PROPFIND, OPTIONS, and COPY and MOVE from one document to another. A store without :put, :list or :delete takes no PUT, gives no listing or takes no DELETE, and a client of it leaves the same keys out of its WebDAV store.
(backend {:keys [list fetch put delete] :as store} content-types)The backend of webdav-clj's handler over store, whose documents are
the members of the root collection, by the content-types that
webdav/content-type takes. A document is text or bytes as
webdav/binary? says.
The backend of webdav-clj's handler over `store`, whose documents are the members of the root collection, by the `content-types` that webdav/content-type takes. A document is text or bytes as webdav/binary? says.
(handler store base)(handler
store
base
{:keys [max-bytes content-types] :or {max-bytes (* 32 1024 1024)} :as opts})A Ring handler that serves store over WebDAV under base, the path of
the collection with its trailing slash, e.g. "/dav/", with opts.
Mount it under Pedestal, ring-jetty or http-kit for the route base and
everything below it. Whether the router passes a request for the
collection with its trailing slash, and the body of a put unread,
depends on the router. The opts are:
The handler checks no credentials, so mount it behind your login. For a site with many users, give each the store of their own documents, e.g. by making the handler for each request, which costs little, with a function store-of of your own from a user to their store:
(fn [request]
((handler (store-of (:user request)) "/dav/") request))
A Ring handler that serves `store` over WebDAV under `base`, the path of
the collection with its trailing slash, e.g. "/dav/", with `opts`.
Mount it under Pedestal, ring-jetty or http-kit for the route `base` and
everything below it. Whether the router passes a request for the
collection with its trailing slash, and the body of a put unread,
depends on the router. The `opts` are:
- :max-bytes, the most that a put can send, 32 MB by default
- :content-types, the Content-Type of a document by the extension of
its name, over webdav/default-content-types, which also tells text
from bytes
The handler checks no credentials, so mount it behind your login. For a
site with many users, give each the store of their own documents,
e.g. by making the handler for each request, which costs little, with
a function store-of of your own from a user to their store:
(fn [request]
((handler (store-of (:user request)) "/dav/") request))cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |