(filename: string)
| 464 | |
| 465 | /** Returns the MIME type for a filename based on its extension. */ |
| 466 | export const getMimeTypeFromFilename = (filename: string): string => { |
| 467 | const extension = filename.toLowerCase().split('.').pop() |
| 468 | return MIME_TYPES[extension || ''] || 'application/octet-stream' |
| 469 | } |
| 470 | |
| 471 | /** Returns the artifact type (for UI rendering) based on a filename's extension. */ |
| 472 | export const getArtifactTypeFromFilename = (filename: string): string => { |
no outgoing calls
no test coverage detected