Skip to content

Commit 3431d1d

Browse files
cursoragentmfts
andcommitted
Remove CAD, geo (KML/KMZ), and markdown from visitor accepted file types
Co-authored-by: Marc Seitz <mfts@users.noreply.github.com>
1 parent f6aba88 commit 3431d1d

File tree

3 files changed

+2
-23
lines changed

3 files changed

+2
-23
lines changed

components/viewer-upload-component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export function ViewerUploadComponent({
220220
Drag & drop files here, or click to select files
221221
</p>
222222
<p className="mt-1 text-xs text-muted-foreground">
223-
Supported: PDF, Office, spreadsheets, images, CAD, ZIP, and more
223+
Supported: PDF, Office, spreadsheets, images, ZIP, and more
224224
</p>
225225
</div>
226226
)}

components/viewer-upload-zone.tsx

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -104,27 +104,11 @@ export default function ViewerUploadZone({
104104
let contentType = uploadResult.fileType;
105105
let supportedFileType = getSupportedContentType(contentType) ?? "";
106106

107-
if (
108-
uploadResult.fileName.endsWith(".dwg") ||
109-
uploadResult.fileName.endsWith(".dxf")
110-
) {
111-
supportedFileType = "cad";
112-
contentType = `image/vnd.${uploadResult.fileName.split(".").pop()}`;
113-
}
114-
115107
if (uploadResult.fileName.endsWith(".xlsm")) {
116108
supportedFileType = "sheet";
117109
contentType = "application/vnd.ms-excel.sheet.macroEnabled.12";
118110
}
119111

120-
if (
121-
uploadResult.fileName.endsWith(".kml") ||
122-
uploadResult.fileName.endsWith(".kmz")
123-
) {
124-
supportedFileType = "map";
125-
contentType = `application/vnd.google-earth.${uploadResult.fileName.endsWith(".kml") ? "kml+xml" : "kmz"}`;
126-
}
127-
128112
const documentData: DocumentData = {
129113
key: uploadResult.id,
130114
supportedFileType: supportedFileType,
@@ -186,7 +170,7 @@ export default function ViewerUploadZone({
186170
Drop your file(s) here
187171
</span>
188172
<p className="mt-1 text-xs leading-5 text-muted-foreground">
189-
PDF, Office, images, CAD, ZIP, and more
173+
PDF, Office, images, ZIP, and more
190174
</p>
191175
</div>
192176
</div>

lib/constants.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,16 +178,11 @@ export const VIEWER_ACCEPTED_FILE_TYPES = {
178178
"application/rtf": [], // ".rtf"
179179
"text/rtf": [], // ".rtf"
180180
"text/plain": [], // ".txt"
181-
"text/markdown": [".md"], // ".md"
182-
"image/vnd.dwg": [".dwg"], // ".dwg"
183-
"image/vnd.dxf": [".dxf"], // ".dxf"
184181
"image/png": [], // ".png"
185182
"image/jpeg": [], // ".jpeg"
186183
"image/jpg": [], // ".jpg"
187184
"application/zip": [], // ".zip"
188185
"application/x-zip-compressed": [], // ".zip"
189-
"application/vnd.google-earth.kml+xml": [".kml"], // ".kml"
190-
"application/vnd.google-earth.kmz": [".kmz"], // ".kmz"
191186
"application/vnd.ms-outlook": [".msg"], // ".msg"
192187
};
193188

0 commit comments

Comments
 (0)