Document — Documents
Embedded file attachments (single or multiple) with legacy mirror fields.
Document type (Document, discriminant 18) — Document category. Embedded file attachments (single or multiple) with legacy mirror fields.
Classification
← Types index · Category: Document · Discriminant: 18
Field schema (EntryData)
| Field | Rust type | Optional | Protected | UI label |
|---|---|---|---|---|
filename | String | no | no | Filename |
mime_type | String | no | no | MIME type |
content | Vec<u8> | no | yes | File |
notes | Option<String> | yes | no | Notes |
files | Vec<DocumentAttachment> | no | no | Attached files |
folders | Vec<DocumentFolder> | no | no | folders |
Secrets
Protected fields (masked in UI, EntryType::is_protected_field): content.
Attachments
Attachments
The Document type stores attachments in DocumentInner.files / folders (not Entry.attachments), via attachment_store_mut(). Legacy fields filename, mime_type, content remain the primary payload; multi-file attachments share DocumentAttachment / DocumentFolder structures.
Document structure
DocumentInner (primary payload): filename, mime_type, content (protected), notes, plus files / folders for multi-file attachments. Unified resolution via attachment_store_mut() in document_service.rs.
In the app
Create a Document entry: vault → + → type Document → fill fields → add attachments (optional, all types) → Save. Validation: only title is required (validation_service.rs).