Skip to content

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

feat: make all CAD files (DWG + DXF) download-only

Cursor Agentdcff97867d53
diff --git a/lib/api/documents/process-document.ts b/lib/api/documents/process-document.ts
index 5312bc75..441ac69e 100644
--- a/lib/api/documents/process-document.ts
+++ b/lib/api/documents/process-document.ts
@@ -8,7 +8,6 @@ import notion from "@/lib/notion";
import { getNotionPageIdFromSlug } from "@/lib/notion/utils";
import prisma from "@/lib/prisma";
import {
- convertCadToPdfTask,
convertFilesToPdfTask,
convertKeynoteToPdfTask,
} from "@/lib/trigger/convert-files";
@@ -126,7 +125,7 @@ export const processDocument = async ({
type === "map" ||
type === "email" ||
contentType === "text/tab-separated-values" ||
- contentType === "image/vnd.dwg";
+ type === "cad";
// Save data to the database
const document = await prisma.document.create({
@@ -216,26 +215,6 @@ export const processDocument = async ({
);
}
- if (type === "cad" && contentType !== "image/vnd.dwg") {
- await convertCadToPdfTask.trigger(
- {
- documentId: document.id,
- documentVersionId: document.versions[0].id,
- teamId,
- },
- {
- idempotencyKey: `${teamId}-${document.versions[0].id}-cad`,
- tags: [
- `team_${teamId}`,
- `document_${document.id}`,
- `version:${document.versions[0].id}`,
- ],
- queue: conversionQueueName(teamPlan),
- concurrencyKey: teamId,
- },
- );
- }
-
if (
type === "video" &&
contentType !== "video/mp4" &&