From cbe1483ca56f94505bb53dc8bc490be8f8b1c59f Mon Sep 17 00:00:00 2001 From: imperatormk Date: Wed, 25 Mar 2020 00:48:43 +0100 Subject: [PATCH] Tiny fix for file selection logic (#3) * Reworked upload box * Tiny logic improvement for file selection --- static/upload.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/upload.js b/static/upload.js index 6bf1aa0..b65684e 100644 --- a/static/upload.js +++ b/static/upload.js @@ -114,8 +114,10 @@ const labelClicked = (e) => { } const fileSelected = (_file) => { - file = _file || videoInput.files[0] + const fileObj = _file || videoInput.files[0] if (_file) videoInput.value = '' + + if (fileObj) file = fileObj if (!file) return if (file.size > iMaxFilesize) {