// Duenner Client fuer DOC-05s Backend-Voraussetzung // (dms/internal/documentapi) — der Viewer haelt keine eigene Logik, PDF.js // selbst fuehrt die HTTP(S)-Anfragen (inkl. Range-Requests) direkt gegen // diese URL aus. function apiBase(): string { const base = process.env.NEXT_PUBLIC_DOCUMENT_API_URL; if (!base) { throw new Error("NEXT_PUBLIC_DOCUMENT_API_URL ist nicht gesetzt (Umgebungsvariable erforderlich)"); } return base; } export function documentContentUrl(documentId: string): string { return `${apiBase()}/documents/${encodeURIComponent(documentId)}/content`; }