fix stackblitz issue uploading media to entity

This commit is contained in:
dswbx
2025-01-17 17:02:22 +01:00
parent a6fd9f0d96
commit baab70f9da
2 changed files with 2 additions and 2 deletions

View File

@@ -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": {

View File

@@ -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);