Bound native media preview capabilities and source range reads

This commit is contained in:
karl committed 2026-10-13 14:22:19 +02:00
1 parent 4b0b5ebfd9
commit 370db7e791
13 files changed
+834 -46

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
/** Native previews carry an opaque grant, never a filesystem path or URL. */
export function nativePreviewToken(value: string): string {
if (!/^[a-f0-9]{32}$/.test(value)) {
throw new Error(
"Media preview access is unavailable. Select the file again.",
);
}
return value;
}