From d1d8a43d3ce84afcab42867fe29bfae15f26448c Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 4 Feb 2026 22:37:18 +0000 Subject: [PATCH] fix: remove content type restriction on attachments --- apps/web/src/pages/api/upload/attachment.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/apps/web/src/pages/api/upload/attachment.ts b/apps/web/src/pages/api/upload/attachment.ts index 5d78a3cf..8d22703d 100644 --- a/apps/web/src/pages/api/upload/attachment.ts +++ b/apps/web/src/pages/api/upload/attachment.ts @@ -13,7 +13,6 @@ import { createS3Client } from "@kan/shared/utils"; import { assertPermission } from "@kan/api/utils/permissions"; const MAX_SIZE_BYTES = 50 * 1024 * 1024; // 50MB -const allowedContentTypes = ["image/jpeg", "image/png", "image/webp"]; export const config = { api: { @@ -55,10 +54,6 @@ export default withRateLimit( return res.status(400).json({ error: "Missing content type" }); } - if (!allowedContentTypes.includes(contentType)) { - return res.status(400).json({ error: "Invalid content type" }); - } - if (!Number.isFinite(contentLength) || contentLength <= 0) { return res.status(400).json({ error: "Missing or invalid content length" }); }