MCPcopy Create free account
hub / github.com/HKUDS/Paper2Slides / getFileTypeName

Function getFileTypeName

frontend/src/components/MessageInput.jsx:78–86  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

76 }
77
78 const getFileTypeName = (file) => {
79 const ext = file.name?.split('.').pop()?.toLowerCase()
80 if (ext === 'pdf') return 'PDF Document'
81 if (ext === 'md' || ext === 'markdown') return 'Markdown'
82 if (ext === 'doc') return 'Word Document'
83 if (ext === 'docx') return 'Word Document'
84 if (ext === 'ppt' || ext === 'pptx') return 'PowerPoint'
85 return file.type || 'Document'
86 }
87
88 const canSend = selectedFiles.length > 0
89

Callers 1

MessageInputFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected