Skip to main content

Crate adminx_attachments

Crate adminx_attachments 

Source

Structs§

AttachmentStore
Ties a blob store to the metadata table.
LocalFsStore
Stores blobs as files under a root directory.

Constants§

TABLE
Metadata table name.

Traits§

BlobStore
A content-addressed byte store. Keys are opaque strings the caller records in the metadata table; the store only has to round-trip bytes under a key.

Functions§

init
Register a backend built from any BlobStore. Use this to supply a custom store; most apps want init_local instead.
init_local
Register a local-filesystem backend rooted at dir (created on first write). The simplest way to turn attachments on; swap for an object-store backend in production.
migrate_sql
SQL CREATE TABLE IF NOT EXISTS + index for the attachment table. Run once on a SQL backend via adminx_core::seed(adminx_storage::migrate_sql()). Mongo needs nothing.