1// Using jQuery:
2if ($('#upload-input-elem').get(0).files.length === 0) {
3 console.log("No file selected.");
4}
5else
6{
7 console.log("File Selected");
8}
9
10// Using Pure JavaScript:
11if( document.getElementById("upload-input-elem").files.length == 0 ){
12 console.log("no files selected");
13}
14else
15{
16 console.log("File Selected");
17}
18
19// Happy coding, my homies <3