jquery check if input file is empty code example
Example 1: how to check if file upload is empty jquery
if( document.getElementById("videoUploadFile").files.length == 0 ){
console.log("no files selected");
}
Example 2: How to check if input file is empty in jQuery
if ($('#videoUploadFile').get(0).files.length === 0) {
console.log("No files selected.");
}