MCPcopy Create free account
hub / github.com/Athenodoros/TopHat / onCreateFileInput

Function onCreateFileInput

src/dialog/settings/data.tsx:165–171  ·  view source on GitHub ↗
(input: HTMLInputElement)

Source from the content-addressed store, hash-verified

163const reader = new FileReader();
164reader.onload = () => importJSONData(reader.result as string);
165const onCreateFileInput = (input: HTMLInputElement) => {
166 if (!input) return;
167
168 input.onchange = () => {
169 if (input?.files) reader.readAsText(input.files[0]);
170 };
171};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected