How to check if input file is empty in jQuery
Just check the length of files property, which is a FileList object contained on the input element
if( document.getElementById("videoUploadFile").files.length == 0 ){
console.log("no files selected");
}
Here is the jQuery version of it:
if ($('#videoUploadFile').get(0).files.length === 0) {
console.log("No files selected.");
}