Any document store served over WebDAV (RFC 4918), for a Clojure backend whose browser clients sync through their own origin.
The server answers these methods, with ETags and preconditions:
A client of a store without :put, :list or :delete 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 server answers these methods, with ETags and preconditions: - GET and HEAD, for a document - PUT, for a document, when the store has :put - DELETE, for a document, when the store has :delete - PROPFIND at depth zero or one, with a listing of the collection when the store has :list - OPTIONS, so that a client can ask which methods there are - MKCOL, with a 405, since the collection is already there A client of a store without :put, :list or :delete leaves the same keys out of its WebDAV store.
(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 |