(extension: string)
| 309 | * Get MIME type from file extension (fallback if not provided) |
| 310 | */ |
| 311 | export function getMimeTypeFromExtension(extension: string): string { |
| 312 | return EXTENSION_TO_MIME[extension.toLowerCase()] || 'application/octet-stream' |
| 313 | } |
| 314 | |
| 315 | /** |
| 316 | * Resolve a reliable MIME type from a file, falling back to the extension map |
no outgoing calls
no test coverage detected