mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-01 13:34:33 +00:00
fix(mime): restrict pdf proxyType strictly to pdf, csv, and txt files
This commit is contained in:
@@ -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'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user