Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix

Marc Seitz86329bb88695
diff --git a/lib/zod/url-validation.ts b/lib/zod/url-validation.ts
index a46136c1..e9c4d754 100644
--- a/lib/zod/url-validation.ts
+++ b/lib/zod/url-validation.ts
@@ -169,7 +169,7 @@ export const documentUploadSchema = z
},
)
.or(z.literal("text/html")) // Allow text/html for Notion documents
- .nullable(), // Make contentType optional for Notion files
+ .nullish(), // Make contentType optional for Notion files
createLink: z.boolean().optional(),
fileSize: z.number().int().positive().optional(),
})
diff --git a/pages/api/teams/[teamId]/documents/index.ts b/pages/api/teams/[teamId]/documents/index.ts
index dba5a0b4..c6d57eca 100644
--- a/pages/api/teams/[teamId]/documents/index.ts
+++ b/pages/api/teams/[teamId]/documents/index.ts
@@ -280,7 +280,7 @@ export default async function handle(
storageType,
numPages,
supportedFileType: fileType,
- contentType,
+ contentType: contentType || null,
fileSize,
enableExcelAdvancedMode:
fileType === "sheet" &&