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

Function handleFileUpload

packages/ui/src/views/settings/index.jsx:31–45  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

29 const { hasPermission } = useAuth()
30
31 const handleFileUpload = (e) => {
32 if (!e.target.files) return
33
34 const file = e.target.files[0]
35
36 const reader = new FileReader()
37 reader.onload = (evt) => {
38 if (!evt?.target?.result) {
39 return
40 }
41 const { result } = evt.target
42 onUploadFile(result)
43 }
44 reader.readAsText(file)
45 }
46
47 useEffect(() => {
48 if (chatflow && !chatflow.id) {

Callers 1

SettingsFunction · 0.70

Calls 1

onUploadFileFunction · 0.50

Tested by

no test coverage detected