Add tags and categories
This commit is contained in:
@ -1,12 +1,13 @@
|
||||
import { s3 } from "@/lib/s3";
|
||||
import { GetObjectCommand } from "@aws-sdk/client-s3";
|
||||
import "dotenv/config";
|
||||
import { Readable } from "stream";
|
||||
|
||||
export async function getImageBufferFromS3(fileKey: string, fileType?: string): Promise<Buffer> {
|
||||
// const type = fileType ? fileType.split("/")[1] : "webp";
|
||||
|
||||
const command = new GetObjectCommand({
|
||||
Bucket: "gaertan",
|
||||
Bucket: `${process.env.BUCKET_NAME}`,
|
||||
Key: `original/${fileKey}.${fileType}`,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user