Checking the file size before submitting the form has always been like a forbidden fruit to us, thatâs because there was no easy way to access clientsâ file system, which can return the exact size of a file before sending it to the server. Old browsers have no inbuilt capability, and Javascript wonât do it, so normally people would use flash to calculate the file size in HTML upload forms, and most of us just preferred to skip the client part, letting server handle the problem.But in recent years, the HTML5 is doing wonders for the web browsers. It comes with many features, including the client-side file objects manipulation (File API). Which means we can now throwaway the old methods, and adopt to this new system, which not only returns file properties, but it opens a whole new set of possibilities.
Forms HTML5