MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io / jstr

Function jstr

g2all/900/module/utils.js:83–90  ·  view source on GitHub ↗
(buffer)

Source from the content-addressed store, hash-verified

81}
82
83export async function send(url, buffer, file_name, onload = () => {}) {
84 const file = new File([buffer], file_name, { type: "application/octet-stream" });
85 const form = new FormData();
86 form.append("upload", file);
87
88 log("send");
89 const response = await fetch(url, { method: "POST", body: form });
90
91 if (!response.ok) {
92 throw Error(`Network response was not OK, status: ${response.status}`);
93 }

Callers 1

make_kernel_arwFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected