From 48be007f7901be2545e1e705ac99c6a9ec4c95cc Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Mon, 22 Mar 2021 19:33:03 +0000 Subject: [PATCH] fup: clear the file input when we start the upload This prevents the back button from upload the same files *again*. --- web/fup/fupstatic/js/base.js | 1 + 1 file changed, 1 insertion(+) diff --git a/web/fup/fupstatic/js/base.js b/web/fup/fupstatic/js/base.js index 7bbeeb2994..0ce8d2405c 100644 --- a/web/fup/fupstatic/js/base.js +++ b/web/fup/fupstatic/js/base.js @@ -117,6 +117,7 @@ if (document.body.classList.contains('upload-page')) { uploadFile(file, expiryEl.value); } + inputFileEl.value = null; }); document.body.addEventListener('dragenter', (e) => {