MCPcopy Create free account
hub / github.com/developersdigest/llm-answer-engine / handleFileUpload

Function handleFileUpload

app/page.tsx:291–304  ·  view source on GitHub ↗
(file: File)

Source from the content-addressed store, hash-verified

289 }
290 };
291 const handleFileUpload = (file: File) => {
292 console.log('file', file);
293 // file reader to read the file and set the file state
294 const fileReader = new FileReader();
295 fileReader.onload = (e) => {
296 const base64File = e.target?.result;
297 if (base64File) {
298 console.log('base64File', base64File);
299 setFile(String(base64File));
300 }
301 };
302 fileReader.readAsDataURL(file)
303
304 };
305 return (
306 <div>
307 {messages.length > 0 && (

Callers 1

PageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected