Add tags and categories

This commit is contained in:
2025-12-20 17:37:52 +01:00
parent dfb6f7042a
commit e90578c98a
23 changed files with 913 additions and 45 deletions

View File

@ -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}`,
});