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

Function DownloadFile

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

Source from the content-addressed store, hash-verified

22}
23
24export const DownloadFile = (relative_path,callback) => {
25 const filename = relative_path.split("/").pop()
26 axios.get(UrlBase + `/file/download/${filename}?path=${relative_path}`).then((response) => {
27 callback(response);
28 });
29}
30
31export const PreivewFile = (relative_path,callback) => {
32 axios.get(UrlBase + `/file/preview?path=${relative_path}`).then((response) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected