summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorimperatormk <darko.simonovski@hotmail.com>2020-03-25 00:48:43 +0100
committerGitHub <noreply@github.com>2020-03-25 09:48:43 +1000
commitcbe1483ca56f94505bb53dc8bc490be8f8b1c59f (patch)
treedba33dd7bbf578886b2dac4faf8db59f9e810afd
parent51dbbd5b0e67d0757835e007a2e1877a7522058c (diff)
Tiny fix for file selection logic (#3)
* Reworked upload box * Tiny logic improvement for file selection
-rw-r--r--static/upload.js4
1 files changed, 3 insertions, 1 deletions
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) {