MCPcopy Create free account
hub / github.com/dailydotdev/apps / isValidImageType

Function isValidImageType

packages/shared/src/lib/screenshot.ts:208–211  ·  view source on GitHub ↗
(file: File)

Source from the content-addressed store, hash-verified

206 * Validate that a file is an allowed image type for screenshot upload.
207 */
208export const isValidImageType = (file: File): boolean =>
209 ['image/png', 'image/jpeg', 'image/jpg', 'image/webp', 'image/gif'].includes(
210 file.type,
211 );
212
213/**
214 * Maximum file size for screenshot upload (5MB).

Callers 1

FeedbackModalFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected