MCPcopy Create free account
hub / github.com/MiniMax-AI/OpenRoom / mimeToExt

Function mimeToExt

apps/webuiapps/src/lib/imageGenTools.ts:13–21  ·  view source on GitHub ↗
(mime: string)

Source from the content-addressed store, hash-verified

11const IMAGES_DIR = 'generated-images';
12
13function mimeToExt(mime: string): string {
14 const map: Record<string, string> = {
15 'image/png': 'png',
16 'image/jpeg': 'jpg',
17 'image/webp': 'webp',
18 'image/gif': 'gif',
19 };
20 return map[mime] || 'png';
21}
22
23/** Build an accessible URL for a file stored via session-data API */
24function buildFileUrl(filePath: string): string {

Callers 1

executeImageGenToolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected