MCPcopy Create free account
hub / github.com/OpenSN-Library/OpenSN-Library / UploadFile

Function UploadFile

ui/src/Request/file.js:10–16  ·  view source on GitHub ↗
(file,relative_path,callback)

Source from the content-addressed store, hash-verified

8}
9
10export const UploadFile = (file,relative_path,callback) => {
11 const formData = new FormData();
12 formData.append("file", file);
13 axios.post(UrlBase + `/file/?path=${relative_path}`, formData).then((response) => {
14 callback(response);
15 });
16}
17
18export const DeleteFile = (relative_path,callback) => {
19 axios.delete(UrlBase + `/file/?path=${relative_path}`).then((response) => {

Callers 1

FilePage.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected