Tiny fix for file selection logic (#3)
* Reworked upload box * Tiny logic improvement for file selection
This commit is contained in:
parent
51dbbd5b0e
commit
cbe1483ca5
1 changed files with 3 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue