Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created March 6, 2023 15:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save parzibyte/5836ba01972910bcf4c341fcd554ed8b to your computer and use it in GitHub Desktop.
const enviar = async () => {
const data = $canvas.toDataURL("image/png");
const fd = new FormData();
fd.append("imagen", data);
const respuestaHttp = await fetch("http://localhost/recibir.php", {
method: "POST",
body: fd,
});
const nombreImagenSubida = await respuestaHttp.json();
console.log({ nombreImagenSubida });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment