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

Function getContentTypeForFormat

apps/sim/app/api/tools/image/route.ts:473–477  ·  view source on GitHub ↗
(format: string | undefined)

Source from the content-addressed store, hash-verified

471}
472
473function getContentTypeForFormat(format: string | undefined): string {
474 if (format === 'jpeg') return 'image/jpeg'
475 if (format === 'webp') return 'image/webp'
476 return 'image/png'
477}
478
479function extensionFromContentType(contentType: string): string {
480 if (contentType.includes('jpeg') || contentType.includes('jpg')) return 'jpg'

Callers 1

generateWithOpenAIFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected