Checking file upload with jQuery


I have a file upload field on my form and I am trying to check whether it is empty or not. The following code works

if (document.getElementById('logo').value == '') {

but the following does not

if ($('#logo').val() == '') {

Am I missing something?

EDIT: I forgot to include jQuery file :slight_smile: It works now.


if ($('#logo').val() == null) {