web: add uuid() function with fallback if randomUUID is missing

This commit is contained in:
jj
2025-06-11 14:18:04 +00:00
parent eb90843fc9
commit a06baa41c1
4 changed files with 27 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
import { AbstractStorage } from "./storage";
import { uuid } from "$lib/util";
export class MemoryStorage extends AbstractStorage {
#chunkSize: number;
@@ -48,7 +49,7 @@ export class MemoryStorage extends AbstractStorage {
}
}
return new File(outputView, crypto.randomUUID());
return new File(outputView, uuid());
}
#expand(size: number) {