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

Function handleChange

components/Dropzone.tsx:166–172  ·  view source on GitHub ↗
(e: React.ChangeEvent<HTMLInputElement>)

Source from the content-addressed store, hash-verified

164 }, [onFilesAdded]);
165
166 const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
167 if (e.target.files && e.target.files.length > 0) {
168 const validFiles = Array.from<File>(e.target.files).filter(isValidFile);
169 onFilesAdded(validFiles);
170 }
171 if (inputRef.current) inputRef.current.value = '';
172 };
173
174 const handleManualPaste = async (e: React.MouseEvent) => {
175 e.stopPropagation();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected