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

Function isValidImageType

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

Source from the content-addressed store, hash-verified

111 * Validate that a file is an allowed image type for screenshot upload.
112 */
113export const isValidImageType = (file: File): boolean =>
114 ['image/png', 'image/jpeg', 'image/jpg', 'image/webp', 'image/gif'].includes(
115 file.type,
116 );
117
118/**
119 * Maximum file size for screenshot upload (5MB).

Callers 1

FeedbackModalFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected