fix(mime): restrict pdf proxyType strictly to pdf, csv, and txt files

This commit is contained in:
yiling
2026-07-20 11:50:19 +08:00
parent 4ad0df5876
commit 5d4020dc2d
2 changed files with 5 additions and 14 deletions
+1 -11
View File
@@ -15,19 +15,9 @@ export function getProxyType(
lowerMediaType === 'application/pdf' ||
lowerMediaType === 'text/plain' ||
lowerMediaType === 'text/csv' ||
lowerMediaType.includes('msword') ||
lowerMediaType.includes('officedocument') ||
lowerMediaType.includes('vnd.ms-') ||
lowerMediaType.startsWith('text/') ||
lowerFilename.endsWith('.pdf') ||
lowerFilename.endsWith('.txt') ||
lowerFilename.endsWith('.csv') ||
lowerFilename.endsWith('.doc') ||
lowerFilename.endsWith('.docx') ||
lowerFilename.endsWith('.xls') ||
lowerFilename.endsWith('.xlsx') ||
lowerFilename.endsWith('.ppt') ||
lowerFilename.endsWith('.pptx')
lowerFilename.endsWith('.csv')
) {
return 'pdf'
}