Expand description
File descriptor helpers — MIME / extension → preview kind, plus the
serde_json::Value shape the file-preview macros consume.
⚠ A first-class File / Image ORM field type is deferred. For now
you store file paths in Text columns and emit a descriptor JSON
string for the admin to render. This module owns the descriptor
shape so other plugins (and user code) can construct one without
re-implementing the MIME table.
Functions§
- file_
descriptor - Build a file descriptor JSON value.
- resolve_
preview_ kind - Resolve the
preview_kindfrom a MIME type and file extension.