fix: remove content type restriction on attachments

This commit is contained in:
Henry
2026-02-04 22:37:18 +00:00
parent 8ed719c485
commit d1d8a43d3c

View File

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