MCPcopy Create free account
hub / github.com/Sethispr/image-compressor / isValidFile

Function isValidFile

components/Dropzone.tsx:21–29  ·  view source on GitHub ↗
(file: File)

Source from the content-addressed store, hash-verified

19 const dragCounter = useRef(0);
20
21 const isValidFile = (file: File) => {
22 return (
23 file.type.startsWith('image/') ||
24 file.type === 'application/zip' ||
25 file.type === 'application/x-zip-compressed' ||
26 file.name.endsWith('.zip') ||
27 file.name.endsWith('.svg')
28 );
29 };
30
31 useEffect(() => {
32 const handleWindowDragEnter = (e: DragEvent) => {

Callers 1

traverseFileTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected