diff options
| author | imperatormk <darko.simonovski@hotmail.com> | 2020-03-25 00:48:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-25 09:48:43 +1000 |
| commit | cbe1483ca56f94505bb53dc8bc490be8f8b1c59f (patch) | |
| tree | dba33dd7bbf578886b2dac4faf8db59f9e810afd /static/upload.js | |
| parent | 51dbbd5b0e67d0757835e007a2e1877a7522058c (diff) | |
Tiny fix for file selection logic (#3)
* Reworked upload box
* Tiny logic improvement for file selection
Diffstat (limited to 'static/upload.js')
| -rw-r--r-- | static/upload.js | 4 |
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) { |
