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

Function getExtensionFromMime

utils/getMediaUrl.ts:31–34  ·  view source on GitHub ↗
(mimeType: string)

Source from the content-addressed store, hash-verified

29};
30
31export function getExtensionFromMime(mimeType: string): string | undefined {
32 const baseMime = mimeType.split(";")[0].trim().toLowerCase();
33 return mimeToExtension[baseMime];
34}
35
36const extensionToMime: Record<string, string> = {
37 "png": "image/png",

Callers 1

normalizeUploadBlobFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected