Check a file's filesize before uploading it to the server.

From #6496.

Only do this if the browser supports checking a file's size. Older browsers do not allow this.
Should this removed line, still trigger click if files is undefined.