From baab70f9da47582ff0cbd2a01834a3146bd54a4e Mon Sep 17 00:00:00 2001 From: dswbx Date: Fri, 17 Jan 2025 17:02:22 +0100 Subject: [PATCH] fix stackblitz issue uploading media to entity --- app/package.json | 2 +- app/src/media/utils/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/package.json b/app/package.json index 4697eba..6b2a9db 100644 --- a/app/package.json +++ b/app/package.json @@ -3,7 +3,7 @@ "type": "module", "sideEffects": false, "bin": "./dist/cli/index.js", - "version": "0.6.0-rc.5", + "version": "0.6.0-rc.7", "description": "Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, Remix, Astro, Cloudflare, Bun, Node, AWS Lambda & more.", "homepage": "https://bknd.io", "repository": { diff --git a/app/src/media/utils/index.ts b/app/src/media/utils/index.ts index 7a02cf8..a560c88 100644 --- a/app/src/media/utils/index.ts +++ b/app/src/media/utils/index.ts @@ -10,7 +10,7 @@ export function getExtension(filename: string): string | undefined { export function getRandomizedFilename(file: File, length?: number): string; export function getRandomizedFilename(file: string, length?: number): string; export function getRandomizedFilename(file: File | string, length = 16): string { - const filename = file instanceof File ? file.name : file; + const filename = typeof file === "string" ? file : file.name; if (typeof filename !== "string") { console.error("Couldn't extract filename from", file);