import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3"
import {secrets} from "./secrets";



export let s3 = null

export const initS3 = async () => {
    s3 = new S3Client({
        endpoint: secrets.S3_ENDPOINT, // z. B. http://localhost:9000 für MinIO
        region: secrets.S3_REGION,
        credentials: {
            accessKeyId: secrets.S3_ACCESS_KEY,
            secretAccessKey: secrets.S3_SECRET_KEY,
        },
        forcePathStyle: true, // wichtig für MinIO
    })
}
