Add different gallery layouts

This commit is contained in:
2025-07-12 23:30:52 +02:00
parent 505e1e28b8
commit f0d44ff807
18 changed files with 2449 additions and 4 deletions

21
src/lib/s3.ts Normal file
View File

@ -0,0 +1,21 @@
import { GetObjectCommand, S3Client } from "@aws-sdk/client-s3";
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
export const s3 = new S3Client({
region: "us-east-1",
endpoint: "http://10.0.20.11:9010",
forcePathStyle: true,
credentials: {
accessKeyId: "fellies",
secretAccessKey: "XCJ7spqxWZhVn8tkYnfVBFbz2cRKYxPAfeQeIdPRp1",
},
});
export async function getSignedImageUrl(key: string, expiresInSec = 3600) {
const command = new GetObjectCommand({
Bucket: "gaertan",
Key: key,
});
return getSignedUrl(s3, command, { expiresIn: expiresInSec });
}