Refactor code

This commit is contained in:
2026-02-03 13:12:31 +01:00
parent 8572e22c5d
commit 531bb8750e
23 changed files with 106 additions and 48 deletions

View File

@ -1,10 +1,10 @@
import { s3 } from "@/lib/s3";
import { GetObjectCommand } from "@aws-sdk/client-s3";
import { Readable } from "stream";
import type { Readable } from "stream";
export async function getImageBufferFromS3Key(s3Key: string): Promise<Buffer> {
const command = new GetObjectCommand({
Bucket: process.env.BUCKET_NAME!,
Bucket: process.env.BUCKET_NAME,
Key: s3Key,
});