I am trying to grab the file size, of a selected file, before a user submits the form. I am trying to use JQuery to do this so that I can prevent form submission if the file size is too big. But I can't get my code to work right.
My Jquery on form submit:
var size = $("photo-input")[0].files[0].size;
What could I be doing wrong?