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

Function validateImageFileType

apps/web/src/hooks/useImageUpload.ts:142–147  ·  view source on GitHub ↗
(file: File, allowedTypes: readonly string[])

Source from the content-addressed store, hash-verified

140 file: File,
141 options: {
142 allowedTypes: readonly string[];
143 maxOriginalFileSizeBytes: number;
144 maxFileSizeBytes: number;
145 resizeImages?: ImageResizeOptions;
146 }
147): Promise<File> {
148 const typeError = validateImageFileType(file, options.allowedTypes);
149 if (typeError) {
150 throw new Error(typeError);

Callers 1

preprocessImageFileFunction · 0.85

Calls 2

joinMethod · 0.80
isAllowedImageTypeFunction · 0.70

Tested by

no test coverage detected