const jsonData = await (await fetch("https://tempdev-brilliantbronzevicuna.web.val.run/")).text();
const formData = new FormData();
const blob = new Blob([jsonData], { type: "application/javascript" });
formData.append("file", blob, "data.ts");
const apiUrl = "https://filehaus.top/api/upload/data.ts";
try {
const response = await fetch(apiUrl, {
method: "POST",
body: formData,
headers: {
},
});
const result = await response.text();
console.log(response.headers);
console.log("Response:", result);
} catch (error) {
console.error("Error:", error.message);
}