Tiny fix for file selection logic (#3)

* Reworked upload box

* Tiny logic improvement for file selection
This commit is contained in:
imperatormk 2020-03-25 00:48:43 +01:00 committed by GitHub
parent 51dbbd5b0e
commit cbe1483ca5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {