How to check if the file is uploaded to form in Javascript?

I created a form with Django. What I want is A warning popup appears when a user does not upload file to the form. How can I do it? my code:

Django : input field dropdown for receiver customized based on sender

I am trying to make my dropdown list for the receiver in which the sender’s id/name won’t be included. I guess this is not a case of chained dropdown which has been answered previously. Maybe ajax is …