fix(client): mint upload idempotency keys via randomId()

uploadQueue called crypto.randomUUID() bare, which is undefined on
non-secure origins (plain-http localhost and LAN installs) and threw
instead of uploading. Route it through randomId() like the other two
idempotency-key producers so it falls back to getRandomValues, and
update randomId's header comment to name all three producers.
This commit is contained in:
jubnl
2026-08-25 23:16:18 +02:00
parent 0269273d01
commit 5b9aaab847
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import type { AxiosProgressEvent } from 'axios'
import { randomId } from './randomId'
export interface UploadProgress {
done: number
@@ -66,7 +67,7 @@ export async function uploadFilesResilient<T>(
const i = idx++
if (i >= files.length) break
const file = files[i]
const idempotencyKey = crypto.randomUUID()
const idempotencyKey = randomId()
loadedMap.set(i, 0)
let items: T[] | null = null