fix(media): defer Bun S3 client loading

This commit is contained in:
2026-08-29 05:42:32 +00:00 Unverified
parent cf71099b69
commit 9fe9adc6f2
3 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ async function serveMedia(
return new Response("Not found", { status: 404 });
}
const file = getMediaStorage().file(record.objectKey);
const file = (await getMediaStorage()).file(record.objectKey);
let stat: Awaited<ReturnType<typeof file.stat>>;
try {
stat = await file.stat();