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