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

Function onFiles

packages/shared/src/hooks/useControlledImageUpload.ts:52–63  ·  view source on GitHub ↗
(files: FileList)

Source from the content-addressed store, hash-verified

50 });
51
52 const onFiles = (files: FileList) => {
53 const { validFiles, errors } = validateFiles(files);
54
55 if (errors.length) {
56 onError(errors);
57 return;
58 }
59
60 if (validFiles.length) {
61 handleFile(validFiles[0]);
62 }
63 };
64
65 const { handleDragOver, handleDrop } = useDragAndDrop({ onFiles });
66

Callers 2

useFileInputFunction · 0.85
useDragAndDropFunction · 0.85

Calls 2

validateFilesFunction · 0.85
onErrorFunction · 0.50

Tested by

no test coverage detected