Skip to content

Thuật ngữ File Service ​

Thuật ngữĐịnh nghĩa
File ServiceDịch vụ lưu/tải file dùng chung; metadata trong schema minap_file; bytes temp/local/cloud
file_idID ổn định file_{nanoid}; Application chỉ lưu tham chiếu này
tmp_idID upload tạm tmp_{nanoid} để promote
storage_nameBasename vật lý {uuidv7}.{ext} — tách khỏi file_id
storage_keyRelative path chung local+cloud; kết thúc bằng storage_name
Display nameTên người dùng thấy — đổi không đổi object key
workspace_idws_… nullable trên temp/files — foresight quota; không thay authz
VariantWebP multi-size on-demand; disk + variant_cache; video gen từ cover, không từ original video
Video coverẢnh frame (ffmpeg lúc promote, DEC-014/015); cùng file_id; cover_storage_name; seek random từ config; fail → null nhưng vẫn promote; variant dùng cover thay storage_name video
PromoteTemp → file durable storage_tier=local; response đồng bộ trả file_id; video thì tạo cover trong promote; migrate cloud là job async sau
storage_connectionsĐăng ký đích S3-compatible; secret ciphertext + KEK Infisical
Soft referenceLưu id string (acc_…, ws_…) không FK bắt buộc sang Core
DEFERREDHoãn có chủ đích (malware scan, FS audit_events)
PROPOSEDĐề xuất chưa DECIDED (nhiều cột schema, HTTP paths, error codes)
Lifecycle jobs (FS)Child crons trên worker; đăng ký bởi jobs orchestrator (DEC-017); Redis lock per job (DEC-016); RULE-015 = lỗi một item trong tick không dừng batch
RULE-015Per-item isolation trong tick temp GC / variant GC / migrate / purge — xem E.03 §5
Jobs orchestratorMain loop trên minap-file-worker: đọc config → register/re-register child node-cron
minap-file / minap-file-workerSwarm: Next web vs worker; cùng image/shared lib (DEC-016)
Object storeServer S3-compatible giữ bytes; không phải lớp job migrate của FS

Thuật ngữ nền tảng rộng hơn: glossary hub platform-docs.

platform-file/docs = SoT chi tiết File Service · hub platform-docs giữ overview + ref