Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
Remove CAD, geo (KML/KMZ), and markdown from visitor accepted file types
Cursor Agent3431d1d3916b
diff --git a/components/viewer-upload-component.tsx b/components/viewer-upload-component.tsxindex 05a783f8..e04155fd 100644--- a/components/viewer-upload-component.tsx+++ b/components/viewer-upload-component.tsx@@ -220,7 +220,7 @@ export function ViewerUploadComponent({Drag & drop files here, or click to select files</p><p className="mt-1 text-xs text-muted-foreground">- Supported: PDF, Office, spreadsheets, images, CAD, ZIP, and more+ Supported: PDF, Office, spreadsheets, images, ZIP, and more</p></div>)}diff --git a/components/viewer-upload-zone.tsx b/components/viewer-upload-zone.tsxindex b9e42382..a61d4d65 100644--- a/components/viewer-upload-zone.tsx+++ b/components/viewer-upload-zone.tsx@@ -104,27 +104,11 @@ export default function ViewerUploadZone({let contentType = uploadResult.fileType;let supportedFileType = getSupportedContentType(contentType) ?? "";- if (- uploadResult.fileName.endsWith(".dwg") ||- uploadResult.fileName.endsWith(".dxf")- ) {- supportedFileType = "cad";- contentType = `image/vnd.${uploadResult.fileName.split(".").pop()}`;- }-if (uploadResult.fileName.endsWith(".xlsm")) {supportedFileType = "sheet";contentType = "application/vnd.ms-excel.sheet.macroEnabled.12";}- if (- uploadResult.fileName.endsWith(".kml") ||- uploadResult.fileName.endsWith(".kmz")- ) {- supportedFileType = "map";- contentType = `application/vnd.google-earth.${uploadResult.fileName.endsWith(".kml") ? "kml+xml" : "kmz"}`;- }-const documentData: DocumentData = {key: uploadResult.id,supportedFileType: supportedFileType,@@ -186,7 +170,7 @@ export default function ViewerUploadZone({Drop your file(s) here</span><p className="mt-1 text-xs leading-5 text-muted-foreground">- PDF, Office, images, CAD, ZIP, and more+ PDF, Office, images, ZIP, and more</p></div></div>diff --git a/lib/constants.ts b/lib/constants.tsindex 03de233d..f7a41e55 100644--- a/lib/constants.ts+++ b/lib/constants.ts@@ -178,16 +178,11 @@ export const VIEWER_ACCEPTED_FILE_TYPES = {"application/rtf": [], // ".rtf""text/rtf": [], // ".rtf""text/plain": [], // ".txt"- "text/markdown": [".md"], // ".md"- "image/vnd.dwg": [".dwg"], // ".dwg"- "image/vnd.dxf": [".dxf"], // ".dxf""image/png": [], // ".png""image/jpeg": [], // ".jpeg""image/jpg": [], // ".jpg""application/zip": [], // ".zip""application/x-zip-compressed": [], // ".zip"- "application/vnd.google-earth.kml+xml": [".kml"], // ".kml"- "application/vnd.google-earth.kmz": [".kmz"], // ".kmz""application/vnd.ms-outlook": [".msg"], // ".msg"};