Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.onload = () => {
  2.     const url = "http://localhost:9292/upload";
  3.     const form = document.getElementById("upload-form");
  4.     document.getElementById("file-input").onchange = () => fetch(url, {method: "POST", body: new FormData(form)});
  5. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement