MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / isAllowedImageType

Function isAllowedImageType

apps/web/src/hooks/useImageUpload.ts:43–48  ·  view source on GitHub ↗
(
  contentType: string,
  allowedTypes: readonly string[] = APP_BUILDER_IMAGE_ALLOWED_TYPES
)

Source from the content-addressed store, hash-verified

41 width: number,
42 height: number,
43 maxDimensionPx: number
44): ResizeDimensions {
45 const longestSide = Math.max(width, height);
46 if (longestSide <= maxDimensionPx) {
47 return { width, height };
48 }
49
50 const scale = maxDimensionPx / longestSide;
51 return {

Callers 3

validateImageFileTypeFunction · 0.70
useImageUploadFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected