MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / getMimeType

Function getMimeType

packages/baseai/src/dev/providers/utils.ts:59–66  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

57};
58
59export const getMimeType = (url: string): string | undefined => {
60 const urlParts = url.split('.');
61 const extension = urlParts[
62 urlParts.length - 1
63 ] as keyof typeof fileExtensionMimeTypeMap;
64 const mimeType = fileExtensionMimeTypeMap[extension];
65 return mimeType;
66};

Callers 1

chatComplete.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected