Files
searchi/apps/desktop/src/media-access.ts
T

10 lines
296 B
TypeScript

/** 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;
}