MCPcopy Create free account
hub / github.com/SensAI-PT/RAGMeUp / handleUpload

Function handleUpload

ui/node-react/client/src/components/DocumentsPage.js:96–112  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

94 }, [alert]);
95
96 const handleUpload = async (e) => {
97 e.preventDefault();
98 if (!dataset.trim() || files.length === 0) return;
99
100 setUploading(true);
101 try {
102 const result = await uploadDocuments(files, dataset.trim());
103 setAlert({ type: 'success', message: result.message });
104 setFiles([]);
105 setDataset('');
106 loadDocuments();
107 } catch (err) {
108 setAlert({ type: 'error', message: err.message });
109 } finally {
110 setUploading(false);
111 }
112 };
113
114 const handleDelete = async (filename) => {
115 if (!window.confirm(`Delete "${filename}"? This cannot be undone.`)) return;

Callers

nothing calls this directly

Calls 1

uploadDocumentsFunction · 0.85

Tested by

no test coverage detected