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

9 lines
296 B
TypeScript
Raw Normal View History

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