feat: Files payloads move from oCIS WebDAV to R2 object storage

The Files tab was the only payload path not on object storage, violating the
2026-10-06 directive (object storage is the ONLY media I/O path) — and oCIS's
WebDAV surface is currently 500ing server-side, which made every upload fail.

Uploads now seal + dedupe into R2 via StorageService (SPENC1, content-
addressed); downloads read R2 when storage_key is set, falling back to oCIS
for legacy rows. Share-into-library copies oCIS Drive sources into R2 and
records the real sha256 instead of a placeholder. Migration 041 adds
chat_media_archive.storage_key.
This commit is contained in:
glass beadian 2026-10-15 22:11:07 +00:00
parent 5808e89dde
commit 18afff5e49
4 changed files with 114 additions and 72 deletions

View file

@ -43,7 +43,7 @@ export interface GroupFile {
checksum: { algorithm: "sha256"; value: string };
createdAt: string;
indexedAt: string;
file: { spaceId: string; resourceId: string; version: string };
file: { spaceId: string; resourceId: string; version: string; storageKey?: string };
/** Authenticated library link by default; never a persisted presigned R2 URL. */
shareLink: { url: string; access: "members" | "public"; expiresAt: string | null };
retention: FileRetention;