Safe Haskell | None |
---|
CouchDB document attachments.
Note about attachment paths: Attachments may have embedded /
characters that are sent unescaped to CouchDB. You can use this to
provide a subtree of attachments under a document. A DocID must have
any /
escaped as %2F
. So if you have document a/b/c
with an
attachment d/e/f.txt
, you would be able to access it at
http://couchdb/db/a%2fb%2fc/d/e/f.txt
.
couchdb-conduit
automaticaly normalizes attachment paths.
- couchGetAttach :: MonadCouch m => Path -> Path -> ByteString -> m (ResumableSource m ByteString, ByteString)
- couchPutAttach :: MonadCouch m => Path -> Path -> ByteString -> Revision -> ByteString -> RequestBody m -> m Revision
- couchDeleteAttach :: MonadCouch m => Path -> Path -> ByteString -> Revision -> m Revision
Documentation
:: MonadCouch m | |
=> Path | Database |
-> Path | Document |
-> ByteString | Attachment path |
-> m (ResumableSource m ByteString, ByteString) |
Get document attachment and Content-Type
.
:: MonadCouch m | |
=> Path | Database |
-> Path | Document |
-> ByteString | Attachment path |
-> Revision | Document revision |
-> ByteString | Attacment |
-> RequestBody m | Attachment body |
-> m Revision |
Put or update document attachment
:: MonadCouch m | |
=> Path | Database |
-> Path | Document |
-> ByteString | Attachment path |
-> Revision | Document revision |
-> m Revision |
Delete document attachment