Skip to content

Reference & Data Model

File (file)

A file is the named shell around a version series; it is readable only when its active version is ready and virus-free.

The file carries name, kind and extension and points to its active version. Every file lives in exactly one volume, either in a folder or directly in the volume. Attachments are ordinary files in the flat „Anhänge“ (Attachments) volume; the assignment to the object is held in the File link. (Data type: file data, manual/system)

File list in the Drive with the columns „Name“, „Typ“ (Type), „Größe“ (Size), „AV“, „Hochgeladen von“ (Uploaded by), „Geändert“ (Modified); sidebar with preview, version, „Größe“, „Kategorie“ (Category), „Status“, „Sicherheit“ (Security), „Typ“, „Erstellt von“ (Created by), „Version von“ (Version by), „Erstellt“ (Created), „Geändert“, „ID“, „Originalname“ (Original name), „Endung“ (Extension). Context menu: „Öffnen“ (Open), „Umbenennen“ (Rename), „Verschieben nach…“ (Move to…), „Details“, „Versionen“ (Versions), „Herunterladen“ (Download), „ID kopieren“ (Copy ID), „Löschen“ (Delete). Upload via „Dateien hochladen“ (Upload files) or drag and drop („Dateien hier ablegen“ – Drop files here). – Guides › Drive & attachments

Field Technical Type Required Meaning Notes
Name title Text yes display name, on upload = file name „Umbenennen“; unique per folder among ready files
Original name original_filename Text yes file name at upload System, immutable
Category kind Selection yes image, video, audio, document, archive, other System, derived from the MIME type
Extension extension Text no part after the last dot System
Active version active_version_id Reference no version used by list, preview and download System; „Wiederherstellen“ (Restore) in the version history changes it
Folder folder_id Reference no empty = top level of the volume „Verschieben nach…“
Size / Type / Status / Security – Display – values of the active version see File version
Created by / Uploaded by created_by Reference yes user who created the file System
Created / Modified created_at / updated_at Date yes timestamps System
Related to Kind Required On archive On delete
Volume belongs to yes – deleted along
Folder belongs to no kept deleted along
File version has many – – deleted along
File link has many – – deleted along

The file itself has no status; what is shown is the upload status and virus status of the active version. In summary:

Upload started ──> scan ──┬─> ready (status = ready AND av_status = clean)
├─> blocked (av_status = infected | error | pending)
└─> failed (status = failed)
  • Created by upload only. Every upload creates a new file with a first version – even if a file with the same name exists. Clients cannot create file rows directly.
  • Read rule (system, packages/file-acl): „Öffnen“, preview and „Herunterladen“ are only possible if the file is not deleted, its folder is not archived, the version has status „Bereit“ (Ready) and the virus scan is „Geprüft“ (Scanned, clean). „Prüfung läuft“ (Scan running) and „Prüfung fehlgeschlagen“ (Scan failed) block just like „Infiziert“ (Infected). Menu entries are then greyed out; the server enforces the same rule.
  • Unique names: Only once the first version is ready is the file stamped (first_ready_at) and takes part in name uniqueness. If the name collides with an existing ready file in the same folder, the server appends a counter to the name.
  • Moving only into folders of the same volume; renaming changes only title, not the original name.
  • Deleting is a soft delete (the file disappears from the Drive, links are deleted along); deleted files cannot be restored.
  • The server derives the category from the MIME type (image/* → image, PDF/Office/text/* → document, zip/tar/gz/7z/rar → archive, otherwise other).

File version · File link · Guides › Drive