MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / handleFileUpload

Function handleFileUpload

packages/ui/src/views/tools/index.jsx:113–127  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

111 }
112
113 const handleFileUpload = (e) => {
114 if (!e.target.files) return
115
116 const file = e.target.files[0]
117
118 const reader = new FileReader()
119 reader.onload = (evt) => {
120 if (!evt?.target?.result) {
121 return
122 }
123 const { result } = evt.target
124 onUploadFile(result)
125 }
126 reader.readAsText(file)
127 }
128
129 const addNew = () => {
130 const dialogProp = {

Callers 1

renderCustomToolsToolbarFunction · 0.70

Calls 1

onUploadFileFunction · 0.70

Tested by

no test coverage detected