fix(media): defer Bun S3 client loading
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user