feat(guides): add structured image-first editor
CI / Verify (push) Successful in 1m0s
CI / Build immutable images and deploy (push) Failing after 2m38s

This commit is contained in:
2026-08-29 13:30:52 +00:00 Unverified
parent b8e3b99033
commit dc5c667b4e
36 changed files with 5611 additions and 381 deletions
+5 -2
View File
@@ -1,5 +1,3 @@
import "server-only";
import type { S3Client } from "bun";
let client: S3Client | undefined;
@@ -26,3 +24,8 @@ export async function getMediaStorage(): Promise<S3Client> {
client = await loading;
return client;
}
export function publicMediaUrl(objectKey: string): string {
const base = required("S3_PUBLIC_URL").replace(/\/+$/u, "");
return `${base}/${objectKey.split("/").map(encodeURIComponent).join("/")}`;
}