Public
Script
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
11
export async function uploadTo0x0(data, name) {
const blob = new Blob([data]);
const formData = new FormData();
formData.append("file", blob, name);
formData.append("expires", "1");
const response = await fetch("https://0x0.st", {
method: "POST",
body: formData,
});
return await response.text();
}
v12 was merged from the PR "modernize" by stevekrouse
April 19, 2024