diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 64dfdfa3..847ad75b 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,4 +1,3 @@ -import { env } from "@/env"; import { type ClassValue, clsx } from "clsx"; import { twMerge } from "tailwind-merge"; @@ -29,19 +28,6 @@ export function concat(...inputs: string[]) { return inputs.join(""); } -/** - * Get the file url from the filename - * @example - * const url = getFileUrl("filename.jpg") - * // https://r2.example.com/filename.jpg - * // make sure to set the R2_PUBLIC_URL in the .env - */ -export function getFileUrl(filename: string) { - // If the R2_PUBLIC_URL is not set fallback to a dummy url - const url = new URL(filename, env.R2_PUBLIC_URL ?? "no-public-url.com"); - return url.toString(); -} - export interface ApiErrorResponse { message: string; detailedMessage?: string;