MCPcopy Index your code
hub / github.com/simstudioai/sim / getAttachmentExtension

Function getAttachmentExtension

apps/sim/providers/attachments.ts:250–253  ·  view source on GitHub ↗
(file: UserFile, mimeType: string)

Source from the content-addressed store, hash-verified

248}
249
250function getAttachmentExtension(file: UserFile, mimeType: string): string {
251 if (mimeType === 'text/markdown') return 'md'
252 return getExtensionFromMimeType(mimeType) || getFileExtension(file.name)
253}
254
255function normalizeProviderMimeType(mimeType: string, provider: AttachmentProvider): string {
256 if ((provider === 'anthropic' || provider === 'google') && isTextDocumentMimeType(mimeType)) {

Callers 1

Calls 2

getExtensionFromMimeTypeFunction · 0.90
getFileExtensionFunction · 0.90

Tested by

no test coverage detected