Bound native media preview capabilities and source range reads
This commit is contained in:
1 parent
4b0b5ebfd9
commit
370db7e791
13 files changed
+834
-46
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user