Refactor code
This commit is contained in:
@ -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,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user