feat: make avatar upload size limit configurable via environment variable (#375)

This commit is contained in:
Thomas Goetten
2026-03-10 23:16:20 +01:00
committed by GitHub
parent 400dcec56d
commit 0b49f502a9
3 changed files with 4 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ import { env } from "~/env";
import { withRateLimit } from "@kan/api/utils/rateLimit";
import { createS3Client } from "@kan/shared/utils";
const MAX_SIZE_BYTES = 2 * 1024 * 1024; // 2MB
const MAX_SIZE_BYTES = parseInt(process.env.S3_AVATAR_UPLOAD_LIMIT || '2097152', 10); // Default 2MB
const allowedContentTypes = ["image/jpeg", "image/png", "image/webp"];
export const config = {