MCPcopy Create free account
hub / github.com/ScattrdBlade/bigFileUpload / getMimeFromExtension

Function getMimeFromExtension

utils/getMediaUrl.ts:58–60  ·  view source on GitHub ↗
(ext?: string)

Source from the content-addressed store, hash-verified

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

Callers 2

shouldProxyEmbedUrlFunction · 0.90
normalizeUploadBlobFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected