diff --git a/static/main.js b/static/main.js index 3748592..bb52829 100644 --- a/static/main.js +++ b/static/main.js @@ -3,9 +3,13 @@ async function formClick(ev) { let { target } = ev; + let fData = new FormData(target); + + target.querySelector('input[type=file]').value = null; + let fetched = await fetch(target.action, { 'method': 'POST', - 'body': new FormData(target) + 'body': fData }); let json = await fetched.json();