Articles in this section

How documents work across the platform

Published:
Updated:

MobilityManager stores every attached file through one shared component called the DocumentModule. This article explains how that module works so you understand the common rules that apply wherever you upload, view, or delete a file.

One document engine for the whole platform

Instead of each area keeping its own file store, vehicles, damage cases, penalty notices, receipts, driver's licences, and compliance reports all route through the same DocumentModule. Whatever you upload is recorded the same way, encrypted the same way, and isolated to your company (tenant) the same way. The module exposes a small set of operations: upload, list metadata, preview/download, and delete.

Associations: how a file knows where it belongs

A document is never stored on its own. Every file is attached to a parent record through two values:

  • Association type — the kind of record. Supported types are Vehicle, DamageCase, Beleg (receipt/expense document), Mandate (Strafmandat / penalty notice), driver-license, and license-compliance-report.
  • Association ID — the numeric ID of that specific record.

If you send an association type the module does not recognize, the upload is rejected with "Document operation unavailable". This is why you attach documents from inside a record (a vehicle, a Beleg, a damage case) rather than to a free-floating library.

What the platform records for each document

FieldMeaning
File nameOriginal file name, up to 256 characters.
Content typeMIME type, stored as sent by your browser.
File sizeSize in bytes.
CategoryA required system document category (for example invoice, photo, receipt).
Source typeupload for files you upload, or url_ingestion for files pulled from an external URL.
UploaderYour user ID and email, kept for the audit trail.

Versioning

Each document keeps its file content as a numbered version. The first upload becomes version 1; uploading a replacement adds a new version rather than overwriting the previous one. Downloads always return the latest version, so history is preserved without cluttering the list.

Permissions

Two permissions gate all document work: documents:view (list and download) and documents:manage (upload and delete). These are typically held by the FleetManager and SystemAdmin roles, and can be granted to custom roles. Permissions are enforced server-side via [RequirePermission], so hiding a button is never the only line of defense.

Note: Every document operation also requires a valid tenant context. If your session has no active company, the platform returns "Tenant context is required for document operations" and the action stops before any file is read or written.

Related

  • Uploading a document and file size limits
  • Managing document categories
  • Attaching documents to vehicles, damage cases, penalty notices, and receipts
  • Encryption at rest and the encryption key
AH
Written by Alexander Hagemann
Updated:
Access denied
Access denied