prevent file duping

This commit is contained in:
biglyderv 2024-11-25 14:12:43 -05:00
parent 3109c791f1
commit dc01beac8c

View file

@ -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();