MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / resolveResourceMimeType

Method resolveResourceMimeType

src/runtime/adapters/feishu.ts:440–445  ·  view source on GitHub ↗
(
    resource: ResourceDescriptor & { type: FeishuSupportedResourceType },
    filename: string,
  )

Source from the content-addressed store, hash-verified

438 return filename;
439 }
440 return resource.type === "image" ? `image-${index + 1}.png` : `file-${index + 1}`;
441 }
442
443 private resolveResourceMimeType(
444 resource: ResourceDescriptor & { type: FeishuSupportedResourceType },
445 filename: string,
446 ): string | undefined {
447 return detectMimeType(filename) || (resource.type === "image" ? "image/png" : undefined);
448 }

Callers 1

Calls 1

detectMimeTypeFunction · 0.85

Tested by

no test coverage detected