SyntaxFix
Write A Post
Hire A Developer
Questions
Try this simple workaround.
var files = $("#file").get(0).files; var size = files[0].size; if (size >= 5000000) { alert("File size is greater than or equal to 5 MB"); }