(ext?: string)
| 56 | }; |
| 57 | |
| 58 | export function getMimeFromExtension(ext?: string): string { |
| 59 | return extensionToMime[ext?.toLowerCase() ?? ""] || "application/octet-stream"; |
| 60 | } |
| 61 | |
| 62 | export async function getExtensionFromBytes(blob: Blob): Promise<string | undefined> { |
| 63 | const buffer = await blob.slice(0, 12).arrayBuffer(); |
no outgoing calls
no test coverage detected